if(!AmCharts)var AmCharts={};AmCharts.inheriting={};AmCharts.Class=function(t){var i=function(){arguments[0]!==AmCharts.inheriting&&(this.events={},this.construct.apply(this,arguments))};t.inherits?(i.prototype=new t.inherits(AmCharts.inheriting),i.base=t.inherits.prototype,delete t.inherits):(i.prototype.createEvents=function(){for(var t=0,i=arguments.length;t<i;t++)this.events[arguments[t]]=[]},i.prototype.listenTo=function(t,i,e){t.events[i].push({handler:e,scope:this})},i.prototype.addListener=function(t,i,e){this.events[t].push({handler:i,scope:e})},i.prototype.removeListener=function(t,i,e){t=t.events[i];for(i=t.length-1;0<=i;i--)t[i].handler===e&&t.splice(i,1)},i.prototype.fire=function(t,i){for(var e=this.events[t],s=0,a=e.length;s<a;s++){var r=e[s];r.handler.call(r.scope,i)}});for(var e in t)i.prototype[e]=t[e];return i};AmCharts.charts=[];AmCharts.addChart=function(t){AmCharts.charts.push(t)};AmCharts.removeChart=function(t){for(var i=AmCharts.charts,e=i.length-1;0<=e;e--)i[e]==t&&i.splice(e,1)};AmCharts.IEversion=0;AmCharts.isModern=!0;-1!=navigator.appVersion.indexOf("MSIE")&&document.documentMode&&(AmCharts.IEversion=Number(document.documentMode),9>AmCharts.IEversion&&(AmCharts.isModern=!1));if(document.addEventListener||window.opera)AmCharts.isNN=!0,AmCharts.isIE=!1,AmCharts.dx=.5,AmCharts.dy=.5;document.attachEvent&&(AmCharts.isNN=!1,AmCharts.isIE=!0,AmCharts.isModern||(AmCharts.dx=0,AmCharts.dy=0));window.chrome&&(AmCharts.chrome=!0);AmCharts.handleResize=function(){for(var t=AmCharts.charts,i=0;i<t.length;i++){var e=t[i];e&&e.div&&e.handleResize()}};AmCharts.handleMouseUp=function(t){for(var i=AmCharts.charts,e=0;e<i.length;e++){var s=i[e];s&&s.handleReleaseOutside(t)}};AmCharts.handleMouseMove=function(t){for(var i=AmCharts.charts,e=0;e<i.length;e++){var s=i[e];s&&s.handleMouseMove(t)}};AmCharts.resetMouseOver=function(){for(var t=AmCharts.charts,i=0;i<t.length;i++){var e=t[i];e&&(e.mouseIsOver=!1)}};AmCharts.onReadyArray=[];AmCharts.ready=function(t){AmCharts.onReadyArray.push(t)};AmCharts.handleLoad=function(){for(var t=AmCharts.onReadyArray,i=0;i<t.length;i++)(0,t[i])()};AmCharts.useUTC=!1;AmCharts.updateRate=40;AmCharts.uid=0;AmCharts.getUniqueId=function(){AmCharts.uid++;return"AmChartsEl-"+AmCharts.uid};AmCharts.isNN&&(document.addEventListener("mousemove",AmCharts.handleMouseMove,!0),window.addEventListener("resize",AmCharts.handleResize,!0),document.addEventListener("mouseup",AmCharts.handleMouseUp,!0),window.addEventListener("load",AmCharts.handleLoad,!0));AmCharts.isIE&&(document.attachEvent("onmousemove",AmCharts.handleMouseMove),window.attachEvent("onresize",AmCharts.handleResize),document.attachEvent("onmouseup",AmCharts.handleMouseUp),window.attachEvent("onload",AmCharts.handleLoad));AmCharts.clear=function(){var t=AmCharts.charts;if(t)for(var i=0;i<t.length;i++)t[i].clear();AmCharts.charts=null;AmCharts.isNN&&(document.removeEventListener("mousemove",AmCharts.handleMouseMove,!0),window.removeEventListener("resize",AmCharts.handleResize,!0),document.removeEventListener("mouseup",AmCharts.handleMouseUp,!0),window.removeEventListener("load",AmCharts.handleLoad,!0));AmCharts.isIE&&(document.detachEvent("onmousemove",AmCharts.handleMouseMove),window.detachEvent("onresize",AmCharts.handleResize),document.detachEvent("onmouseup",AmCharts.handleMouseUp),window.detachEvent("onload",AmCharts.handleLoad))};AmCharts.toBoolean=function(t,i){if(void 0===t)return i;switch(String(t).toLowerCase()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1;default:return Boolean(t)}};AmCharts.removeFromArray=function(t,i){var e;for(e=t.length-1;0<=e;e--)t[e]==i&&t.splice(e,1)};AmCharts.getStyle=function(t,i){var e="";document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(t,"").getPropertyValue(i):t.currentStyle&&(i=i.replace(/\-(\w)/g,function(t,i){return i.toUpperCase()}),e=t.currentStyle[i]);return e};AmCharts.removePx=function(t){return Number(t.substring(0,t.length-2))};AmCharts.getURL=function(t,i){if(t)if("_self"!=i&&i)if("_top"==i&&window.top)window.top.location.href=t;else if("_parent"==i&&window.parent)window.parent.location.href=t;else{var e=document.getElementsByName(i)[0];e?e.src=t:window.open(t)}else window.location.href=t};AmCharts.ifArray=function(t){return t&&0<t.length?!0:!1};AmCharts.callMethod=function(t,i){var e;for(e=0;e<i.length;e++){var s=i[e];if(s){if(s[t])s[t]();var a=s.length;if(0<a){var r;for(r=0;r<a;r++){var h=s[r];if(h&&h[t])h[t]()}}}}};AmCharts.toNumber=function(t){return"number"==typeof t?t:Number(String(t).replace(/[^0-9\-.]+/g,""))};AmCharts.toColor=function(t){if(""!==t&&void 0!==t)if(-1!=t.indexOf(",")){t=t.split(",");var i;for(i=0;i<t.length;i++){var e=t[i].substring(t[i].length-6,t[i].length);t[i]="#"+e}}else t=t.substring(t.length-6,t.length),t="#"+t;return t};AmCharts.toCoordinate=function(t,i,e){var s;void 0!==t&&(t=String(t),e&&e<i&&(i=e),s=Number(t),-1!=t.indexOf("!")&&(s=i-Number(t.substr(1))),-1!=t.indexOf("%")&&(s=i*Number(t.substr(0,t.length-1))/100));return s};AmCharts.fitToBounds=function(t,i,e){t<i&&(t=i);t>e&&(t=e);return t};AmCharts.isDefined=function(t){return void 0===t?!1:!0};AmCharts.stripNumbers=function(t){return t.replace(/[0-9]+/g,"")};AmCharts.roundTo=function(t,i){if(0>i)return t;var e=Math.pow(10,i);return Math.round(t*e)/e};AmCharts.toFixed=function(t,i){var e=String(Math.round(t*Math.pow(10,i)));if(0<i){var s=e.length;if(s<i){var a;for(a=0;a<i-s;a++)e="0"+e}s=e.substring(0,e.length-i);""===s&&(s=0);return s+"."+e.substring(e.length-i,e.length)}return String(e)};AmCharts.formatDuration=function(t,i,e,s,a,r){var h=AmCharts.intervals,o=r.decimalSeparator;if(t>=h[i].contains){var n=t-Math.floor(t/h[i].contains)*h[i].contains;"ss"==i&&(n=AmCharts.formatNumber(n,r),1==n.split(o)[0].length&&(n="0"+n));("mm"==i||"hh"==i)&&10>n&&(n="0"+n);e=n+""+s[i]+""+e;t=Math.floor(t/h[i].contains);i=h[i].nextInterval;return AmCharts.formatDuration(t,i,e,s,a,r)}"ss"==i&&(t=AmCharts.formatNumber(t,r),1==t.split(o)[0].length&&(t="0"+t));("mm"==i||"hh"==i)&&10>t&&(t="0"+t);e=t+""+s[i]+""+e;if(h[a].count>h[i].count)for(t=h[i].count;t<h[a].count;t++)i=h[i].nextInterval,"ss"==i||"mm"==i||"hh"==i?e="00"+s[i]+""+e:"DD"==i&&(e="0"+s[i]+""+e);":"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1));return e};AmCharts.formatNumber=function(t,i,e,s,a){t=AmCharts.roundTo(t,i.precision);isNaN(e)&&(e=i.precision);var r=i.decimalSeparator;i=i.thousandsSeparator;var h;h=0>t?"-":"";t=Math.abs(t);var o=String(t),n=!1;-1!=o.indexOf("e")&&(n=!0);0<=e&&!n&&(o=AmCharts.toFixed(t,e));var l="";if(n)l=o;else{var o=o.split("."),n=String(o[0]),d;for(d=n.length;0<=d;d-=3)l=d!=n.length?0!==d?n.substring(d-3,d)+i+l:n.substring(d-3,d)+l:n.substring(d-3,d);void 0!==o[1]&&(l=l+r+o[1]);void 0!==e&&0<e&&"0"!=l&&(l=AmCharts.addZeroes(l,r,e))}l=h+l;""===h&&!0===s&&0!==t&&(l="+"+l);!0===a&&(l+="%");return l};AmCharts.addZeroes=function(t,i,e){t=t.split(i);void 0===t[1]&&0<e&&(t[1]="0");return t[1].length<e?(t[1]+="0",AmCharts.addZeroes(t[0]+i+t[1],i,e)):void 0!==t[1]?t[0]+i+t[1]:t[0]};AmCharts.scientificToNormal=function(t){var i;t=String(t).split("e");var e;if("-"==t[1].substr(0,1)){i="0.";for(e=0;e<Math.abs(Number(t[1]))-1;e++)i+="0";i+=t[0].split(".").join("")}else{var s=0;i=t[0].split(".");i[1]&&(s=i[1].length);i=t[0].split(".").join("");for(e=0;e<Math.abs(Number(t[1]))-s;e++)i+="0"}return i};AmCharts.toScientific=function(t,i){if(0===t)return"0";var e=Math.floor(Math.log(Math.abs(t))*Math.LOG10E);Math.pow(10,e);mantissa=String(mantissa).split(".").join(i);return String(mantissa)+"e"+e};AmCharts.randomColor=function(){return"#"+("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6)};AmCharts.hitTest=function(t,i,e){var s=!1,a=t.x,r=t.x+t.width,h=t.y,o=t.y+t.height,n=AmCharts.isInRectangle;s||(s=n(a,h,i));s||(s=n(a,o,i));s||(s=n(r,h,i));s||(s=n(r,o,i));s||!0===e||(s=AmCharts.hitTest(i,t,!0));return s};AmCharts.isInRectangle=function(t,i,e){return t>=e.x-5&&t<=e.x+e.width+5&&i>=e.y-5&&i<=e.y+e.height+5?!0:!1};AmCharts.isPercents=function(t){if(-1!=String(t).indexOf("%"))return!0};AmCharts.findPosX=function(t){var i=t,e=t.offsetLeft;if(t.offsetParent){for(;t=t.offsetParent;)e+=t.offsetLeft;for(;(i=i.parentNode)&&i!=document.body;)e-=i.scrollLeft||0}return e};AmCharts.findPosY=function(t){var i=t,e=t.offsetTop;if(t.offsetParent){for(;t=t.offsetParent;)e+=t.offsetTop;for(;(i=i.parentNode)&&i!=document.body;)e-=i.scrollTop||0}return e};AmCharts.findIfFixed=function(t){if(t.offsetParent)for(;t=t.offsetParent;)if("fixed"==AmCharts.getStyle(t,"position"))return!0;return!1};AmCharts.findIfAuto=function(t){return t.style&&"auto"==AmCharts.getStyle(t,"overflow")?!0:t.parentNode?AmCharts.findIfAuto(t.parentNode):!1};AmCharts.findScrollLeft=function(t,i){t.scrollLeft&&(i+=t.scrollLeft);return t.parentNode?AmCharts.findScrollLeft(t.parentNode,i):i};AmCharts.findScrollTop=function(t,i){t.scrollTop&&(i+=t.scrollTop);return t.parentNode?AmCharts.findScrollTop(t.parentNode,i):i};AmCharts.formatValue=function(t,i,e,s,a,r,h,o){if(i){void 0===a&&(a="");var n;for(n=0;n<e.length;n++){var l=e[n],d=i[l];void 0!==d&&(d=r?AmCharts.addPrefix(d,o,h,s):AmCharts.formatNumber(d,s),t=t.replace(RegExp("\\[\\["+a+""+l+"\\]\\]","g"),d))}}return t};AmCharts.formatDataContextValue=function(t,i){if(t){var e=t.match(/\[\[.*?\]\]/g),s;for(s=0;s<e.length;s++){var a=e[s],a=a.substr(2,a.length-4);void 0!==i[a]&&(t=t.replace(RegExp("\\[\\["+a+"\\]\\]","g"),i[a]))}}return t};AmCharts.massReplace=function(t,i){for(var e in i)if(i.hasOwnProperty(e)){var s=i[e];void 0===s&&(s="");t=t.replace(e,s)}return t};AmCharts.cleanFromEmpty=function(t){return t.replace(/\[\[[^\]]*\]\]/g,"")};AmCharts.addPrefix=function(t,i,e,s,a){var r=AmCharts.formatNumber(t,s),h="",o,n,l;if(0===t)return"0";0>t&&(h="-");t=Math.abs(t);if(1<t)for(o=i.length-1;-1<o;o--){if(t>=i[o].number&&(n=t/i[o].number,l=Number(s.precision),1>l&&(l=1),e=AmCharts.roundTo(n,l),l=AmCharts.formatNumber(e,{precision:-1,decimalSeparator:s.decimalSeparator,thousandsSeparator:s.thousandsSeparator}),!a||n==e)){r=h+""+l+""+i[o].prefix;break}}else for(o=0;o<e.length;o++)if(t<=e[o].number){n=t/e[o].number;l=Math.abs(Math.round(Math.log(n)*Math.LOG10E));n=AmCharts.roundTo(n,l);r=h+""+n+""+e[o].prefix;break}return r};AmCharts.remove=function(t){t&&t.remove()};AmCharts.copyProperties=function(t,i){for(var e in t)t.hasOwnProperty(e)&&"events"!=e&&void 0!==t[e]&&"function"!=typeof t[e]&&(i[e]=t[e])};AmCharts.recommended=function(){var t="js";document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")||swfobject&&swfobject.hasFlashPlayerVersion("8")&&(t="flash");return t};AmCharts.getEffect=function(t){">"==t&&(t="easeOutSine");"<"==t&&(t="easeInSine");"elastic"==t&&(t="easeOutElastic");return t};AmCharts.extend=function(t,i){for(var e in i)void 0!==i[e]&&(t.hasOwnProperty(e)||(t[e]=i[e]))};AmCharts.fixNewLines=function(t){if(!AmCharts.isModern){var i=RegExp("\\n","g");t&&(t=t.replace(i,"<br />"))}return t};AmCharts.deleteObject=function(t,i){if(t){if(void 0===i||null===i)i=20;if(0!==i)if("[object Array]"===Object.prototype.toString.call(t))for(var e=0;e<t.length;e++)AmCharts.deleteObject(t[e],i-1),t[e]=null;else try{for(e in t)t[e]&&("object"==typeof t[e]&&AmCharts.deleteObject(t[e],i-1),"function"!=typeof t[e]&&(t[e]=null))}catch(s){}}};AmCharts.bounce=function(t,i,e,s,a){return(i/=a)<1/2.75?7.5625*s*i*i+e:i<2/2.75?s*(7.5625*(i-=1.5/2.75)*i+.75)+e:i<2.5/2.75?s*(7.5625*(i-=2.25/2.75)*i+.9375)+e:s*(7.5625*(i-=2.625/2.75)*i+.984375)+e};AmCharts.easeInSine=function(t,i,e,s,a){return-s*Math.cos(i/a*(Math.PI/2))+s+e};AmCharts.easeOutSine=function(t,i,e,s,a){return s*Math.sin(i/a*(Math.PI/2))+e};AmCharts.easeOutElastic=function(t,i,e,s,a){t=1.70158;var r=0,h=s;if(0===i)return e;if(1==(i/=a))return e+s;r||(r=.3*a);h<Math.abs(s)?(h=s,t=r/4):t=r/(2*Math.PI)*Math.asin(s/h);return h*Math.pow(2,-10*i)*Math.sin(2*(i*a-t)*Math.PI/r)+s+e};AmCharts.AxisBase=AmCharts.Class({construct:function(){this.viY=this.viX=this.y=this.x=this.dy=this.dx=0;this.axisThickness=1;this.axisColor="#000000";this.axisAlpha=1;this.gridCount=this.tickLength=5;this.gridAlpha=.15;this.gridThickness=1;this.gridColor="#000000";this.dashLength=0;this.labelFrequency=1;this.showLastLabel=this.showFirstLabel=!0;this.fillColor="#FFFFFF";this.fillAlpha=0;this.labelsEnabled=!0;this.labelRotation=0;this.autoGridCount=!0;this.valueRollOverColor="#CC0000";this.offset=0;this.guides=[];this.visible=!0;this.counter=0;this.guides=[];this.ignoreAxisWidth=this.inside=!1;this.minGap=75;this.titleBold=!0;this.minorGridEnabled=!1;this.minorGridAlpha=.07},zoom:function(t,i){this.start=t;this.end=i;this.dataChanged=!0;this.draw()},fixAxisPosition:function(){var t=this.position;"H"==this.orientation?("left"==t&&(t="bottom"),"right"==t&&(t="top")):("bottom"==t&&(t="left"),"top"==t&&(t="right"));this.position=t},draw:function(){var t=this.chart;void 0===this.titleColor&&(this.titleColor=t.color);isNaN(this.titleFontSize)&&(this.titleFontSize=t.fontSize+1);this.allLabels=[];this.counter=0;this.destroy();this.fixAxisPosition();this.labels=[];var i=t.container,e=i.set();t.gridSet.push(e);this.set=e;i=i.set();t.axesLabelsSet.push(i);this.labelsSet=i;this.axisLine=new this.axisRenderer(this);this.autoGridCount&&("V"==this.orientation?(t=this.height/35,3>t&&(t=3)):t=this.width/this.minGap,this.gridCount=Math.max(t,1));this.axisWidth=this.axisLine.axisWidth;this.addTitle()},setOrientation:function(t){this.orientation=t?"H":"V"},addTitle:function(){var t=this.title;if(t){var i=this.chart;this.titleLabel=AmCharts.text(i.container,t,this.titleColor,i.fontFamily,this.titleFontSize,"middle",this.titleBold)}},positionTitle:function(){var t=this.titleLabel;if(t){var i,e,s=this.labelsSet,a={};0<s.length()?a=s.getBBox():(a.x=0,a.y=0,a.width=this.viW,a.height=this.viH);s.push(t);var s=a.x,r=a.y;AmCharts.VML&&(this.rotate?s-=this.x:r-=this.y);var h=a.width,a=a.height,o=this.viW,n=this.viH;t.getBBox();var l=0,d=this.titleFontSize/2,u=this.inside;switch(this.position){case"top":i=o/2;e=r-10-d;break;case"bottom":i=o/2;e=r+a+10+d;break;case"left":i=s-10-d;u&&(i-=5);e=n/2;l=-90;break;case"right":i=s+h+10+d-3,u&&(i+=7),e=n/2,l=-90}this.marginsChanged?(t.translate(i,e),this.tx=i,this.ty=e):t.translate(this.tx,this.ty);this.marginsChanged=!1;0!==l&&t.rotate(l)}},pushAxisItem:function(t,i){var e=t.graphics();0<e.length()&&(i?this.labelsSet.push(e):this.set.push(e));(e=t.getLabel())&&this.labelsSet.push(e)},addGuide:function(t){this.guides.push(t)},removeGuide:function(t){var i=this.guides,e;for(e=0;e<i.length;e++)i[e]==t&&i.splice(e,1)},handleGuideOver:function(t){clearTimeout(this.chart.hoverInt);var i=t.graphics.getBBox(),e=i.x+i.width/2,i=i.y+i.height/2,s=t.fillColor;void 0===s&&(s=t.lineColor);this.chart.showBalloon(t.balloonText,s,!0,e,i)},handleGuideOut:function(t){this.chart.hideBalloon()},addEventListeners:function(t,i){var e=this;t.mouseover(function(){e.handleGuideOver(i)});t.mouseout(function(){e.handleGuideOut(i)})},getBBox:function(){var t=this.labelsSet.getBBox();AmCharts.VML||(t={x:t.x+this.x,y:t.y+this.y,width:t.width,height:t.height});return t},destroy:function(){AmCharts.remove(this.set);AmCharts.remove(this.labelsSet);var t=this.axisLine;t&&AmCharts.remove(t.set);AmCharts.remove(this.grid0)}});AmCharts.ValueAxis=AmCharts.Class({inherits:AmCharts.AxisBase,construct:function(){this.createEvents("axisChanged","logarithmicAxisFailed","axisSelfZoomed","axisZoomed");AmCharts.ValueAxis.base.construct.call(this);this.dataChanged=!0;this.gridCount=8;this.stackType="none";this.position="left";this.unitPosition="right";this.recalculateToPercents=this.includeHidden=this.includeGuidesInMinMax=this.integersOnly=!1;this.durationUnits={DD:"d. ",hh:":",mm:":",ss:""};this.scrollbar=!1;this.baseValue=0;this.radarCategoriesEnabled=!0;this.gridType="polygons";this.useScientificNotation=!1;this.axisTitleOffset=10;this.minMaxMultiplier=1},updateData:function(){0>=this.gridCount&&(this.gridCount=1);this.totals=[];this.data=this.chart.chartData;"xy"!=this.chart.chartType&&(this.stackGraphs("smoothedLine"),this.stackGraphs("line"),this.stackGraphs("column"),this.stackGraphs("step"));this.recalculateToPercents&&this.recalculate();this.synchronizationMultiplier&&this.synchronizeWith?this.foundGraphs=!0:(this.foundGraphs=!1,this.getMinMax())},draw:function(){AmCharts.ValueAxis.base.draw.call(this);var t=this.chart,i=this.set;"duration"==this.type&&(this.duration="ss");!0===this.dataChanged&&(this.updateData(),this.dataChanged=!1);if(this.logarithmic&&(0>=this.getMin(0,this.data.length-1)||0>=this.minimum))this.fire("logarithmicAxisFailed",{type:"logarithmicAxisFailed",chart:t});else{this.grid0=null;var e,s,a=t.dx,r=t.dy,h=!1,o=this.logarithmic,n=t.chartType;if(isNaN(this.min)||isNaN(this.max)||!this.foundGraphs||Infinity==this.min||-Infinity==this.max)h=!0;else{var l=this.labelFrequency,d=this.showFirstLabel,u=this.showLastLabel,c=1,m=0,p=Math.round((this.max-this.min)/this.step)+1,f;!0===o?(f=Math.log(this.max)*Math.LOG10E-Math.log(this.minReal)*Math.LOG10E,this.stepWidth=this.axisWidth/f,2<f&&(p=Math.ceil(Math.log(this.max)*Math.LOG10E)+1,m=Math.round(Math.log(this.minReal)*Math.LOG10E),p>this.gridCount&&(c=Math.ceil(p/this.gridCount)))):this.stepWidth=this.axisWidth/(this.max-this.min);var g=0;1>this.step&&-1<this.step&&(g=this.getDecimals(this.step));this.integersOnly&&(g=0);g>this.maxDecCount&&(g=this.maxDecCount);var v=this.precision;isNaN(v)||(g=v);this.max=AmCharts.roundTo(this.max,this.maxDecCount);this.min=AmCharts.roundTo(this.min,this.maxDecCount);var C={};C.precision=g;C.decimalSeparator=t.numberFormatter.decimalSeparator;C.thousandsSeparator=t.numberFormatter.thousandsSeparator;this.numberFormatter=C;var A,b=this.guides,x=b.length;if(0<x){e=this.fillAlpha;for(s=this.fillAlpha=0;s<x;s++){var y=b[s],w=NaN,M=y.above;isNaN(y.toValue)||(w=this.getCoordinate(y.toValue),A=new this.axisItemRenderer(this,w,"",!0,NaN,NaN,y),this.pushAxisItem(A,M));var N=NaN;isNaN(y.value)||(N=this.getCoordinate(y.value),A=new this.axisItemRenderer(this,N,y.label,!0,NaN,(w-N)/2,y),this.pushAxisItem(A,M));isNaN(w-N)||(A=new this.guideFillRenderer(this,N,w,y),this.pushAxisItem(A,M),A=A.graphics(),y.graphics=A,y.balloonText&&this.addEventListeners(A,y))}this.fillAlpha=e}b=!1;for(s=m;s<p;s+=c)x=AmCharts.roundTo(this.step*s+this.min,g),-1!=String(x).indexOf("e")&&(b=!0,String(x).split("e"));this.duration&&(this.maxInterval=AmCharts.getMaxInterval(this.max,this.duration));var g=this.step,S,x=this.minorGridAlpha;this.minorGridEnabled&&(S=this.getMinorGridStep(g,this.stepWidth*g));for(s=m;s<p;s+=c)if(m=g*s+this.min,m=AmCharts.roundTo(m,this.maxDecCount+1),!this.integersOnly||Math.round(m)==m)if(isNaN(v)||Number(AmCharts.toFixed(m,v))==m){!0===o&&(0===m&&(m=this.minReal),2<f&&(m=Math.pow(10,s)),b=-1!=String(m).indexOf("e")?!0:!1);this.useScientificNotation&&(b=!0);this.usePrefixes&&(b=!1);b?(A=-1==String(m).indexOf("e")?m.toExponential(15):String(m),e=A.split("e"),A=Number(e[0]),e=Number(e[1]),A=AmCharts.roundTo(A,14),10==A&&(A=1,e+=1),A=A+"e"+e,0===m&&(A="0"),1==m&&(A="1")):(o&&(A=String(m).split("."),C.precision=A[1]?A[1].length:-1),A=this.usePrefixes?AmCharts.addPrefix(m,t.prefixesOfBigNumbers,t.prefixesOfSmallNumbers,C,!0):AmCharts.formatNumber(m,C,C.precision));this.duration&&(A=AmCharts.formatDuration(m,this.duration,"",this.durationUnits,this.maxInterval,C));this.recalculateToPercents?A+="%":(e=this.unit)&&(A="left"==this.unitPosition?e+A:A+e);Math.round(s/l)!=s/l&&(A=void 0);if(0===s&&!d||s==p-1&&!u)A=" ";e=this.getCoordinate(m);this.labelFunction&&(A=this.labelFunction(m,A,this));A=new this.axisItemRenderer(this,e,A);this.pushAxisItem(A);if(m==this.baseValue&&"radar"!=n){var T,L,M=this.viW,w=this.viH;A=this.viX;y=this.viY;"H"==this.orientation?0<=e&&e<=M+1&&(T=[e,e,e+a],L=[w,0,r]):0<=e&&e<=w+1&&(T=[0,M,M+a],L=[e,e,e+r]);T&&(e=AmCharts.fitToBounds(2*this.gridAlpha,0,1),e=AmCharts.line(t.container,T,L,this.gridColor,e,1,this.dashLength),e.translate(A,y),this.grid0=e,t.axesSet.push(e),e.toBack())}if(!isNaN(S)&&0<x&&s<p-1){A=this.gridAlpha;this.gridAlpha=this.minorGridAlpha;for(e=1;e<g/S;e++)y=this.getCoordinate(m+S*e),y=new this.axisItemRenderer(this,y,"",!1,0,0,!1,!1,0,!0),this.pushAxisItem(y);this.gridAlpha=A}}s=this.baseValue;this.min>this.baseValue&&this.max>this.baseValue&&(s=this.min);this.min<this.baseValue&&this.max<this.baseValue&&(s=this.max);o&&s<this.minReal&&(s=this.minReal);this.baseCoord=this.getCoordinate(s);t={type:"axisChanged",target:this,chart:t};t.min=o?this.minReal:this.min;t.max=this.max;this.fire("axisChanged",t);this.axisCreated=!0}o=this.axisLine.set;t=this.labelsSet;this.positionTitle();"radar"!=n?(n=this.viX,s=this.viY,i.translate(n,s),t.translate(n,s)):o.toFront();!this.visible||h?(i.hide(),o.hide(),t.hide()):(i.show(),o.show(),t.show())}},getDecimals:function(t){var i=0;isNaN(t)||(t=String(t),-1!=t.indexOf("e-")?i=Number(t.split("-")[1]):-1!=t.indexOf(".")&&(i=t.split(".")[1].length));return i},getMinorGridStep:function(t,i){var e=[5,4,2];60>i&&e.shift();for(var s=Math.floor(Math.log(Math.abs(t))*Math.LOG10E),a=0;a<e.length;a++){var r=t/e[a],h=Math.floor(Math.log(Math.abs(r))*Math.LOG10E);if(!(0<Math.abs(s-h)))if(1>t){if(h=Math.pow(10,-h)*r,h==Math.round(h))return r}else if(r==Math.round(r))return r}},stackGraphs:function(t){var i=this.stackType;"stacked"==i&&(i="regular");"line"==i&&(i="none");"100% stacked"==i&&(i="100%");this.stackType=i;var e=[],s=[],a=[],r=[],h,o=this.chart.graphs,n,l,d,u,c=this.baseValue,m=!1;if("line"==t||"step"==t||"smoothedLine"==t)m=!0;if(m&&("regular"==i||"100%"==i))for(u=0;u<o.length;u++)d=o[u],d.hidden||(l=d.type,d.chart==this.chart&&d.valueAxis==this&&t==l&&d.stackable&&(n&&(d.stackGraph=n),n=d));for(n=this.start;n<=this.end;n++){var p=0;for(u=0;u<o.length;u++)if(d=o[u],!d.hidden&&(l=d.type,d.chart==this.chart&&d.valueAxis==this&&t==l&&d.stackable&&(l=this.data[n].axes[this.id].graphs[d.id],h=l.values.value,!isNaN(h)))){var f=this.getDecimals(h);p<f&&(p=f);isNaN(r[n])?r[n]=Math.abs(h):r[n]+=Math.abs(h);r[n]=AmCharts.roundTo(r[n],p);d=d.fillToGraph;m&&d&&(d=this.data[n].axes[this.id].graphs[d.id])&&(l.values.open=d.values.value);"regular"==i&&(m&&(isNaN(e[n])?(e[n]=h,l.values.close=h,l.values.open=this.baseValue):(isNaN(h)?l.values.close=e[n]:l.values.close=h+e[n],l.values.open=e[n],e[n]=l.values.close)),"column"!=t||isNaN(h)||(l.values.close=h,0>h?(l.values.close=h,isNaN(s[n])?l.values.open=c:(l.values.close+=s[n],l.values.open=s[n]),s[n]=l.values.close):(l.values.close=h,isNaN(a[n])?l.values.open=c:(l.values.close+=a[n],l.values.open=a[n]),a[n]=l.values.close)))}}for(n=this.start;n<=this.end;n++)for(u=0;u<o.length;u++)d=o[u],d.hidden||(l=d.type,d.chart==this.chart&&d.valueAxis==this&&t==l&&d.stackable&&(l=this.data[n].axes[this.id].graphs[d.id],h=l.values.value,isNaN(h)||(e=100*(h/r[n]),l.values.percents=e,l.values.total=r[n],"100%"==i&&(isNaN(s[n])&&(s[n]=0),isNaN(a[n])&&(a[n]=0),0>e?(l.values.close=AmCharts.fitToBounds(e+s[n],-100,100),l.values.open=s[n],s[n]=l.values.close):(l.values.close=AmCharts.fitToBounds(e+a[n],-100,100),l.values.open=a[n],a[n]=l.values.close)))))},recalculate:function(){var t=this.chart.graphs,i;for(i=0;i<t.length;i++){var e=t[i];if(e.valueAxis==this){var s="value";if("candlestick"==e.type||"ohlc"==e.type)s="open";var a,r,h=this.end+2,h=AmCharts.fitToBounds(this.end+1,0,this.data.length-1),o=this.start;0<o&&o--;var n;r=this.start;e.compareFromStart&&(r=0);for(n=r;n<=h&&(r=this.data[n].axes[this.id].graphs[e.id],a=r.values[s],isNaN(a));n++);for(s=o;s<=h;s++){r=this.data[s].axes[this.id].graphs[e.id];r.percents={};var o=r.values,l;for(l in o)r.percents[l]="percents"!=l?100*(o[l]/a)-100:o[l]}}}},getMinMax:function(){var t=!1,i=this.chart,e=i.graphs,s;for(s=0;s<e.length;s++){var a=e[s].type;("line"==a||"step"==a||"smoothedLine"==a)&&this.expandMinMax&&(t=!0)}t&&(0<this.start&&this.start--,this.end<this.data.length-1&&this.end++);"serial"==i.chartType&&(!0!==i.categoryAxis.parseDates||t||this.end<this.data.length-1&&this.end++);t=this.minMaxMultiplier;this.min=this.getMin(this.start,this.end);this.max=this.getMax();t=(this.max-this.min)*(t-1);this.min-=t;this.max+=t;t=this.guides.length;if(this.includeGuidesInMinMax&&0<t)for(i=0;i<t;i++)e=this.guides[i],e.toValue<this.min&&(this.min=e.toValue),e.value<this.min&&(this.min=e.value),e.toValue>this.max&&(this.max=e.toValue),e.value>this.max&&(this.max=e.value);isNaN(this.minimum)||(this.min=this.minimum);isNaN(this.maximum)||(this.max=this.maximum);this.min>this.max&&(t=this.max,this.max=this.min,this.min=t);isNaN(this.minTemp)||(this.min=this.minTemp);isNaN(this.maxTemp)||(this.max=this.maxTemp);this.minReal=this.min;this.maxReal=this.max;0===this.min&&0===this.max&&(this.max=9);this.min>this.max&&(this.min=this.max-1);t=this.min;i=this.max;e=this.max-this.min;s=0===e?Math.pow(10,Math.floor(Math.log(Math.abs(this.max))*Math.LOG10E))/10:Math.pow(10,Math.floor(Math.log(Math.abs(e))*Math.LOG10E))/10;isNaN(this.maximum)&&isNaN(this.maxTemp)&&(this.max=Math.ceil(this.max/s)*s+s);isNaN(this.minimum)&&isNaN(this.minTemp)&&(this.min=Math.floor(this.min/s)*s-s);0>this.min&&0<=t&&(this.min=0);0<this.max&&0>=i&&(this.max=0);"100%"==this.stackType&&(this.min=0>this.min?-100:0,this.max=0>this.max?0:100);e=this.max-this.min;s=Math.pow(10,Math.floor(Math.log(Math.abs(e))*Math.LOG10E))/10;this.step=Math.ceil(e/this.gridCount/s)*s;e=Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E));e=this.fixStepE(e);s=Math.ceil(this.step/e);5<s&&(s=10);5>=s&&2<s&&(s=5);this.step=Math.ceil(this.step/(e*s))*e*s;1>e?(this.maxDecCount=Math.abs(Math.log(Math.abs(e))*Math.LOG10E),this.maxDecCount=Math.round(this.maxDecCount),this.step=AmCharts.roundTo(this.step,this.maxDecCount+1)):this.maxDecCount=0;this.min=this.step*Math.floor(this.min/this.step);this.max=this.step*Math.ceil(this.max/this.step);0>this.min&&0<=t&&(this.min=0);0<this.max&&0>=i&&(this.max=0);1<this.minReal&&1<this.max-this.minReal&&(this.minReal=Math.floor(this.minReal));e=Math.pow(10,Math.floor(Math.log(Math.abs(this.minReal))*Math.LOG10E));0===this.min&&(this.minReal=e);0===this.min&&1<this.minReal&&(this.minReal=1);0<this.min&&0<this.minReal-this.step&&(this.minReal=this.min+this.step<this.minReal?this.min+this.step:this.min);e=Math.log(i)*Math.LOG10E-Math.log(t)*Math.LOG10E;this.logarithmic&&(2<e?(this.minReal=this.min=Math.pow(10,Math.floor(Math.log(Math.abs(t))*Math.LOG10E)),this.max=Math.pow(10,Math.ceil(Math.log(Math.abs(i))*Math.LOG10E))):(i=Math.pow(10,Math.floor(Math.log(Math.abs(this.min))*Math.LOG10E))/10,t=Math.pow(10,Math.floor(Math.log(Math.abs(t))*Math.LOG10E))/10,i<t&&(this.minReal=this.min=10*t)))},fixStepE:function(t){t=t.toExponential(0).split("e");var i=Number(t[1]);9==Number(t[0])&&i++;return this.generateNumber(1,i)},generateNumber:function(t,i){var e="",s;s=0>i?Math.abs(i)-1:Math.abs(i);var a;for(a=0;a<s;a++)e+="0";return 0>i?Number("0."+e+String(t)):Number(String(t)+e)},getMin:function(t,i){var e,s;for(s=t;s<=i;s++){var a=this.data[s].axes[this.id].graphs,r;for(r in a)if(a.hasOwnProperty(r)){var h=this.chart.getGraphById(r);if(h.includeInMinMax&&(!h.hidden||this.includeHidden)){isNaN(e)&&(e=Infinity);this.foundGraphs=!0;h=a[r].values;this.recalculateToPercents&&(h=a[r].percents);var o;if(this.minMaxField)o=h[this.minMaxField],o<e&&(e=o);else for(var n in h)h.hasOwnProperty(n)&&"percents"!=n&&"total"!=n&&(o=h[n],o<e&&(e=o))}}}return e},getMax:function(){var t,i;for(i=this.start;i<=this.end;i++){var e=this.data[i].axes[this.id].graphs,s;for(s in e)if(e.hasOwnProperty(s)){var a=this.chart.getGraphById(s);if(a.includeInMinMax&&(!a.hidden||this.includeHidden)){isNaN(t)&&(t=-Infinity);this.foundGraphs=!0;a=e[s].values;this.recalculateToPercents&&(a=e[s].percents);var r;if(this.minMaxField)r=a[this.minMaxField],r>t&&(t=r);else for(var h in a)a.hasOwnProperty(h)&&"percents"!=h&&"total"!=h&&(r=a[h],r>t&&(t=r))}}}return t},dispatchZoomEvent:function(t,i){var e={type:"axisZoomed",startValue:t,endValue:i,target:this,chart:this.chart};this.fire(e.type,e)},zoomToValues:function(t,i){if(i<t){var e=i;i=t;t=e}t<this.min&&(t=this.min);i>this.max&&(i=this.max);e={type:"axisSelfZoomed"};e.chart=this.chart;e.valueAxis=this;e.multiplier=this.axisWidth/Math.abs(this.getCoordinate(i)-this.getCoordinate(t));e.position="V"==this.orientation?this.reversed?this.getCoordinate(t):this.getCoordinate(i):this.reversed?this.getCoordinate(i):this.getCoordinate(t);this.fire(e.type,e)},coordinateToValue:function(t){if(isNaN(t))return NaN;var i=this.axisWidth,e=this.stepWidth,s=this.reversed,a=this.rotate,r=this.min,h=this.minReal;return!0===this.logarithmic?Math.pow(10,(a?!0===s?(i-t)/e:t/e:!0===s?t/e:(i-t)/e)+Math.log(h)*Math.LOG10E):!0===s?a?r-(t-i)/e:t/e+r:a?t/e+r:r-(t-i)/e},getCoordinate:function(t){if(isNaN(t))return NaN;var i=this.rotate,e=this.reversed,s=this.axisWidth,a=this.stepWidth,r=this.min,h=this.minReal;!0===this.logarithmic?(t=Math.log(t)*Math.LOG10E-Math.log(h)*Math.LOG10E,i=i?!0===e?s-a*t:a*t:!0===e?a*t:s-a*t):i=!0===e?i?s-a*(t-r):a*(t-r):i?a*(t-r):s-a*(t-r);i=this.rotate?i+(this.x-this.viX):i+(this.y-this.viY);return Math.round(i)},synchronizeWithAxis:function(t){this.synchronizeWith=t;this.removeListener(this.synchronizeWith,"axisChanged",this.handleSynchronization);this.listenTo(this.synchronizeWith,"axisChanged",this.handleSynchronization)},handleSynchronization:function(t){var i=this.synchronizeWith;t=i.min;var e=i.max,i=i.step,s=this.synchronizationMultiplier;s&&(this.min=t*s,this.max=e*s,this.step=i*s,t=Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E)),t=Math.abs(Math.log(Math.abs(t))*Math.LOG10E),this.maxDecCount=t=Math.round(t),this.draw())}});AmCharts.RecAxis=AmCharts.Class({construct:function(t){var i=t.chart,e=t.axisThickness,s=t.axisColor,a=t.axisAlpha,r=t.offset,h=t.dx,o=t.dy,n=t.viX,l=t.viY,d=t.viH,u=t.viW,c=i.container;"H"==t.orientation?(s=AmCharts.line(c,[0,u],[0,0],s,a,e),this.axisWidth=t.width,"bottom"==t.position?(t=e/2+r+d+l-1,e=n):(t=-e/2-r+l+o,e=h+n)):(this.axisWidth=t.height,"right"==t.position?(s=AmCharts.line(c,[0,0,-h],[0,d,d-o],s,a,e),t=l+o,e=e/2+r+h+u+n-1):(s=AmCharts.line(c,[0,0],[0,d],s,a,e),t=l,e=-e/2-r+n));s.translate(e,t);i.axesSet.push(s);this.set=s}});AmCharts.RecItem=AmCharts.Class({construct:function(t,i,e,s,a,r,h,o,n,l){i=Math.round(i);void 0==e&&(e="");n||(n=0);void 0==s&&(s=!0);var d=t.chart.fontFamily,u=t.fontSize;void 0==u&&(u=t.chart.fontSize);var c=t.color;void 0==c&&(c=t.chart.color);var m=t.chart.container,p=m.set();this.set=p;var f=t.axisThickness,g=t.axisColor,v=t.axisAlpha,C=t.tickLength,A=t.gridAlpha,b=t.gridThickness,x=t.gridColor,y=t.dashLength,w=t.fillColor,M=t.fillAlpha,N=t.labelsEnabled,S=t.labelRotation,T=t.counter,L=t.inside,B=t.dx,D=t.dy,k=t.orientation,O=t.position,R=t.previousCoord,F=t.viH,I=t.viW,z=t.offset,G,P;h?(N=!0,isNaN(h.tickLength)||(C=h.tickLength),void 0!=h.lineColor&&(x=h.lineColor),void 0!=h.color&&(c=h.color),isNaN(h.lineAlpha)||(A=h.lineAlpha),isNaN(h.dashLength)||(y=h.dashLength),isNaN(h.lineThickness)||(b=h.lineThickness),!0===h.inside&&(L=!0),isNaN(h.labelRotation)||(S=h.labelRotation),isNaN(h.fontSize)||(u=h.fontSize),h.position&&(O=h.position)):""===e&&(C=0);P="start";a&&(P="middle");var E=S*Math.PI/180,Y,W=0,V=0,H=0,X=Y=0;"V"==k&&(S=0);var j;N&&(j=AmCharts.text(m,e,c,d,u,P,o),X=j.getBBox().width);if("H"==k){if(0<=i&&i<=I+1&&(0<C&&0<v&&i+n<=I+1&&(G=AmCharts.line(m,[i+n,i+n],[0,C],g,v,b),p.push(G)),0<A&&(P=AmCharts.line(m,[i,i+B,i+B],[F,F+D,D],x,A,b,y),p.push(P))),V=0,W=i,h&&90==S&&(W-=u),!1===s?(P="start",V="bottom"==O?L?V+C:V-C:L?V-C:V+C,W+=3,a&&(W+=a/2,P="middle"),0<S&&(P="middle")):P="middle",1==T&&0<M&&!h&&!l&&R<I&&(s=AmCharts.fitToBounds(i,0,I),R=AmCharts.fitToBounds(R,0,I),Y=s-R,0<Y&&(fill=AmCharts.rect(m,Y,t.height,w,M),fill.translate(s-Y+B,D),p.push(fill))),"bottom"==O?(V+=F+u/2+z,L?0<S?(V=F-X/2*Math.sin(E)-C-3,W+=X/2*Math.cos(E)):V-=C+u+3+3:0<S?(V=F+X/2*Math.sin(E)+C+3,W-=X/2*Math.cos(E)):V+=C+f+3+3):(V+=D+u/2-z,
W+=B,L?0<S?(V=X/2*Math.sin(E)+C+3,W-=X/2*Math.cos(E)):V+=C+3:0<S?(V=-(X/2)*Math.sin(E)-C-6,W+=X/2*Math.cos(E)):V-=C+u+3+f+3),"bottom"==O?Y=(L?F-C-1:F+f-1)+z:(H=B,Y=(L?D:D-C-f+1)-z),r&&(W+=r),D=W,0<S&&(D+=X/2*Math.cos(E)),j&&(O=0,L&&(O=X/2*Math.cos(E)),D+O>I+2||0>D))j.remove(),j=null}else{0<=i&&i<=F+1&&(0<C&&0<v&&i+n<=F+1&&(G=AmCharts.line(m,[0,C],[i+n,i+n],g,v,b),p.push(G)),0<A&&(P=AmCharts.line(m,[0,B,I+B],[i,i+D,i+D],x,A,b,y),p.push(P)));P="end";if(!0===L&&"left"==O||!1===L&&"right"==O)P="start";V=i-u/2;1==T&&0<M&&!h&&!l&&(s=AmCharts.fitToBounds(i,0,F),R=AmCharts.fitToBounds(R,0,F),E=s-R,fill=AmCharts.polygon(m,[0,t.width,t.width,0],[0,0,E,E],w,M),fill.translate(B,s-E+D),p.push(fill));V+=u/2;"right"==O?(W+=B+I+z,V+=D,L?(W-=C+4,r||(V-=u/2+3)):(W+=C+4+f,V-=2)):L?(W+=C+4-z,r||(V-=u/2+3),h&&(W+=B,V+=D)):(W+=-C-f-4-2-z,V-=2);G&&("right"==O?(H+=B+z+I,Y+=D,H=L?H-f:H+f):(H-=z,L||(H-=C+f)));r&&(V+=r);L=-3;"right"==O&&(L+=D);j&&(V>F+1||V<L)&&(j.remove(),j=null)}G&&G.translate(H,Y);!1===t.visible&&(G&&G.remove(),j&&(j.remove(),j=null));j&&(j.attr({"text-anchor":P}),j.translate(W,V),0!==S&&j.rotate(-S),t.allLabels.push(j)," "!=e&&(this.label=j));l||(t.counter=0===T?1:0,t.previousCoord=i);0===this.set.node.childNodes.length&&this.set.remove()},graphics:function(){return this.set},getLabel:function(){return this.label}});AmCharts.RecFill=AmCharts.Class({construct:function(t,i,e,s){var a=t.dx,r=t.dy,h=t.orientation,o=0;if(e<i){var n=i;i=e;e=n}var l=s.fillAlpha;isNaN(l)&&(l=0);n=t.chart.container;s=s.fillColor;"V"==h?(i=AmCharts.fitToBounds(i,0,t.viH),e=AmCharts.fitToBounds(e,0,t.viH)):(i=AmCharts.fitToBounds(i,0,t.viW),e=AmCharts.fitToBounds(e,0,t.viW));e-=i;isNaN(e)&&(e=4,o=2,l=0);0>e&&"object"==typeof s&&(s=s.join(",").split(",").reverse());"V"==h?(t=AmCharts.rect(n,t.width,e,s,l),t.translate(a,i-o+r)):(t=AmCharts.rect(n,e,t.height,s,l),t.translate(i-o+a,r));this.set=n.set([t])},graphics:function(){return this.set},getLabel:function(){}});AmCharts.AmChart=AmCharts.Class({construct:function(){this.version="3.0.1";AmCharts.addChart(this);this.createEvents("dataUpdated","init","rendered","drawn");this.height=this.width="100%";this.dataChanged=!0;this.chartCreated=!1;this.previousWidth=this.previousHeight=0;this.backgroundColor="#FFFFFF";this.borderAlpha=this.backgroundAlpha=0;this.color=this.borderColor="#000000";this.fontFamily="Verdana";this.fontSize=11;this.numberFormatter={precision:-1,decimalSeparator:".",thousandsSeparator:","};this.percentFormatter={precision:2,decimalSeparator:".",thousandsSeparator:","};this.labels=[];this.allLabels=[];this.titles=[];this.marginRight=this.marginLeft=this.autoMarginOffset=0;this.timeOuts=[];var t=document.createElement("div"),i=t.style;i.overflow="hidden";i.position="relative";i.textAlign="left";this.chartDiv=t;t=document.createElement("div");i=t.style;i.overflow="hidden";i.position="relative";i.textAlign="left";this.legendDiv=t;this.balloon=new AmCharts.AmBalloon;this.balloon.chart=this;this.titleHeight=0;this.hideBalloonTime=150;this.prefixesOfBigNumbers=[{number:1e3,prefix:"k"},{number:1e6,prefix:"M"},{number:1e9,prefix:"G"},{number:1e12,prefix:"T"},{number:1e15,prefix:"P"},{number:1e18,prefix:"E"},{number:1e21,prefix:"Z"},{number:1e24,prefix:"Y"}];this.prefixesOfSmallNumbers=[{number:1e-24,prefix:"y"},{number:1e-21,prefix:"z"},{number:1e-18,prefix:"a"},{number:1e-15,prefix:"f"},{number:1e-12,prefix:"p"},{number:1e-9,prefix:"n"},{number:1e-6,prefix:"μ"},{number:.001,prefix:"m"}];this.panEventsEnabled=!1;AmCharts.bezierX=3;AmCharts.bezierY=6;this.product="amcharts";this.animations=[]},drawChart:function(){this.drawBackground();this.redrawLabels();this.drawTitles()},drawBackground:function(){AmCharts.remove(this.background);var t=this.container,i=this.backgroundColor,e=this.backgroundAlpha,s=this.set;AmCharts.isModern||0!==e||(e=.001);var a=this.updateWidth();this.realWidth=a;var r=this.updateHeight();this.realHeight=r;this.background=i=AmCharts.polygon(t,[0,a-1,a-1,0],[0,0,r-1,r-1],i,e,1,this.borderColor,this.borderAlpha);s.push(i);if(i=this.backgroundImage)this.path&&(i=this.path+i),this.bgImg=t=t.image(i,0,0,a,r),s.push(t)},drawTitles:function(){var t=this.titles;if(AmCharts.ifArray(t)){var i=20,e;for(e=0;e<t.length;e++){var s=t[e],a=s.color;void 0===a&&(a=this.color);var r=s.size;isNaN(s.alpha);var h=this.marginLeft,a=AmCharts.text(this.container,s.text,a,this.fontFamily,r);a.translate(h+(this.realWidth-this.marginRight-h)/2,i);h=!0;void 0!==s.bold&&(h=s.bold);h&&a.attr({"font-weight":"bold"});i+=r+6;this.freeLabelsSet.push(a)}}},write:function(t){var i=this.balloon;i&&!i.chart&&(i.chart=this);t="object"!=typeof t?document.getElementById(t):t;t.innerHTML="";this.div=t;t.style.overflow="hidden";t.style.textAlign="left";var i=this.chartDiv,e=this.legendDiv,s=this.legend,a=e.style,r=i.style;this.measure();var h,o;if(s)switch(s.position){case"bottom":t.appendChild(i);t.appendChild(e);break;case"top":t.appendChild(e);t.appendChild(i);break;case"absolute":h=document.createElement("div");o=h.style;o.position="relative";o.width=t.style.width;o.height=t.style.height;t.appendChild(h);a.position="absolute";r.position="absolute";void 0!==s.left&&(a.left=s.left+"px");void 0!==s.right&&(a.right=s.right+"px");void 0!==s.top&&(a.top=s.top+"px");void 0!==s.bottom&&(a.bottom=s.bottom+"px");s.marginLeft=0;s.marginRight=0;h.appendChild(i);h.appendChild(e);break;case"right":h=document.createElement("div");o=h.style;o.position="relative";o.width=t.style.width;o.height=t.style.height;t.appendChild(h);a.position="relative";r.position="absolute";h.appendChild(i);h.appendChild(e);break;case"left":h=document.createElement("div");o=h.style;o.position="relative";o.width=t.style.width;o.height=t.style.height;t.appendChild(h);a.position="absolute";r.position="relative";h.appendChild(i);h.appendChild(e);break;case"outside":t.appendChild(i)}else t.appendChild(i);this.listenersAdded||(this.addListeners(),this.listenersAdded=!0);this.initChart()},createLabelsSet:function(){AmCharts.remove(this.labelsSet);this.labelsSet=this.container.set();this.freeLabelsSet.push(this.labelsSet)},initChart:function(){this.divIsFixed=AmCharts.findIfFixed(this.chartDiv);this.previousHeight=this.divRealHeight;this.previousWidth=this.divRealWidth;this.destroy();this.startInterval();var t=0;document.attachEvent&&!window.opera&&(t=1);this.dmouseX=this.dmouseY=0;var i=document.getElementsByTagName("html")[0];i&&window.getComputedStyle&&(i=window.getComputedStyle(i,null))&&(this.dmouseY=AmCharts.removePx(i.getPropertyValue("margin-top")),this.dmouseX=AmCharts.removePx(i.getPropertyValue("margin-left")));this.mouseMode=t;this.container=new AmCharts.AmDraw(this.chartDiv,this.realWidth,this.realHeight,this);if(AmCharts.VML||AmCharts.SVG)t=this.container,this.set=t.set(),this.gridSet=t.set(),this.graphsBehindSet=t.set(),this.bulletBehindSet=t.set(),this.columnSet=t.set(),this.graphsSet=t.set(),this.trendLinesSet=t.set(),this.axesLabelsSet=t.set(),this.axesSet=t.set(),this.cursorSet=t.set(),this.scrollbarsSet=t.set(),this.bulletSet=t.set(),this.freeLabelsSet=t.set(),this.balloonsSet=t.set(),this.balloonsSet.setAttr("id","balloons"),this.zoomButtonSet=t.set(),this.linkSet=t.set(),this.brrr(),this.renderFix()},measure:function(){var t=this.div,i=this.chartDiv,e=t.offsetWidth,s=t.offsetHeight,a=this.container;t.clientHeight&&(e=t.clientWidth,s=t.clientHeight);var r=AmCharts.removePx(AmCharts.getStyle(t,"padding-left")),h=AmCharts.removePx(AmCharts.getStyle(t,"padding-right")),o=AmCharts.removePx(AmCharts.getStyle(t,"padding-top")),n=AmCharts.removePx(AmCharts.getStyle(t,"padding-bottom"));isNaN(r)||(e-=r);isNaN(h)||(e-=h);isNaN(o)||(s-=o);isNaN(n)||(s-=n);r=t.style;t=r.width;r=r.height;-1!=t.indexOf("px")&&(e=AmCharts.removePx(t));-1!=r.indexOf("px")&&(s=AmCharts.removePx(r));t=AmCharts.toCoordinate(this.width,e);r=AmCharts.toCoordinate(this.height,s);if(t!=this.previousWidth||r!=this.previousHeight)i.style.width=t+"px",i.style.height=r+"px",a&&a.setSize(t,r),this.balloon.setBounds(2,2,t-2,r);this.realWidth=t;this.realHeight=r;this.divRealWidth=e;this.divRealHeight=s},destroy:function(){this.chartDiv.innerHTML="";this.clearTimeOuts();clearInterval(this.interval);this.interval=NaN},clearTimeOuts:function(){var t=this.timeOuts;if(t){var i;for(i=0;i<t.length;i++)clearTimeout(t[i])}this.timeOuts=[]},clear:function(t){AmCharts.callMethod("clear",[this.chartScrollbar,this.scrollbarV,this.scrollbarH,this.chartCursor]);this.chartCursor=this.scrollbarH=this.scrollbarV=this.chartScrollbar=null;this.clearTimeOuts();this.container&&(this.container.remove(this.chartDiv),this.container.remove(this.legendDiv));t||AmCharts.removeChart(this)},setMouseCursor:function(t){"auto"==t&&AmCharts.isNN&&(t="default");this.chartDiv.style.cursor=t;this.legendDiv.style.cursor=t},redrawLabels:function(){this.labels=[];var t=this.allLabels;this.createLabelsSet();var i;for(i=0;i<t.length;i++)this.drawLabel(t[i])},drawLabel:function(t){if(this.container){var i=t.y,e=t.text,s=t.align,a=t.size,r=t.color,h=t.rotation,o=t.alpha,n=t.bold,l=AmCharts.toCoordinate(t.x,this.realWidth),i=AmCharts.toCoordinate(i,this.realHeight);l||(l=0);i||(i=0);void 0===r&&(r=this.color);isNaN(a)&&(a=this.fontSize);s||(s="start");"left"==s&&(s="start");"right"==s&&(s="end");"center"==s&&(s="middle",h?i=this.realHeight-i+i/2:l=this.realWidth/2-l);void 0===o&&(o=1);void 0===h&&(h=0);i+=a/2;e=AmCharts.text(this.container,e,r,this.fontFamily,a,s,n,o);e.translate(l,i);0!==h&&e.rotate(h);t.url&&(e.setAttr("cursor","pointer"),e.click(function(){AmCharts.getURL(t.url)}));this.labelsSet.push(e);this.labels.push(e)}},addLabel:function(t,i,e,s,a,r,h,o,n,l){t={x:t,y:i,text:e,align:s,size:a,color:r,alpha:o,rotation:h,bold:n,url:l};this.container&&this.drawLabel(t);this.allLabels.push(t)},clearLabels:function(){var t=this.labels,i;for(i=t.length-1;0<=i;i--)t[i].remove();this.labels=[];this.allLabels=[]},updateHeight:function(){var t=this.divRealHeight,i=this.legend;if(i){var e=this.legendDiv.offsetHeight,i=i.position;if("top"==i||"bottom"==i)t-=e,0>t&&(t=0),this.chartDiv.style.height=t+"px"}return t},updateWidth:function(){var t=this.divRealWidth,i=this.divRealHeight,e=this.legend;if(e){var s=this.legendDiv,a=s.offsetWidth,r=s.offsetHeight,s=s.style,h=this.chartDiv.style,e=e.position;if("right"==e||"left"==e)t-=a,0>t&&(t=0),h.width=t+"px","left"==e?h.left=a+"px":s.left=t+"px",s.top=(i-r)/2+"px"}return t},getTitleHeight:function(){var t=0,i=this.titles;if(0<i.length){var t=15,e;for(e=0;e<i.length;e++)t+=i[e].size+6}return t},addTitle:function(t,i,e,s,a){isNaN(i)&&(i=this.fontSize+2);t={text:t,size:i,color:e,alpha:s,bold:a};this.titles.push(t);return t},addListeners:function(){var t=this,i=t.chartDiv;AmCharts.isNN&&(t.panEventsEnabled&&"ontouchstart"in document.documentElement&&(i.addEventListener("touchstart",function(i){t.handleTouchMove.call(t,i);t.handleTouchStart.call(t,i)},!0),i.addEventListener("touchmove",function(i){t.handleTouchMove.call(t,i)},!0),i.addEventListener("touchend",function(i){t.handleTouchEnd.call(t,i)},!0)),i.addEventListener("mousedown",function(i){t.handleMouseDown.call(t,i)},!0),i.addEventListener("mouseover",function(i){t.handleMouseOver.call(t,i)},!0),i.addEventListener("mouseout",function(i){t.handleMouseOut.call(t,i)},!0));AmCharts.isIE&&(i.attachEvent("onmousedown",function(i){t.handleMouseDown.call(t,i)}),i.attachEvent("onmouseover",function(i){t.handleMouseOver.call(t,i)}),i.attachEvent("onmouseout",function(i){t.handleMouseOut.call(t,i)}))},dispDUpd:function(){var t;this.dispatchDataUpdated&&(this.dispatchDataUpdated=!1,t="dataUpdated",this.fire(t,{type:t,chart:this}));this.chartCreated||(t="init",this.fire(t,{type:t,chart:this}));this.chartRendered||(t="rendered",this.fire(t,{type:t,chart:this}),this.chartRendered=!0);t="drawn";this.fire(t,{type:t,chart:this})},brrr:function(){},validateSize:function(){var t=this;t.measure();var i=t.legend;if((t.realWidth!=t.previousWidth||t.realHeight!=t.previousHeight)&&0<t.realWidth&&0<t.realHeight){t.sizeChanged=!0;if(i){clearTimeout(t.legendInitTO);var e=setTimeout(function(){i.invalidateSize()},100);t.timeOuts.push(e);t.legendInitTO=e}t.marginsUpdated="xy"!=t.chartType?!1:!0;clearTimeout(t.initTO);e=setTimeout(function(){t.initChart()},150);t.timeOuts.push(e);t.initTO=e}t.renderFix();i&&i.renderFix()},invalidateSize:function(){this.previousHeight=this.previousWidth=NaN;this.invalidateSizeReal()},invalidateSizeReal:function(){var t=this;t.marginsUpdated=!1;clearTimeout(t.validateTO);var i=setTimeout(function(){t.validateSize()},5);t.timeOuts.push(i);t.validateTO=i},validateData:function(t){this.chartCreated&&(this.dataChanged=!0,this.marginsUpdated="xy"!=this.chartType?!1:!0,this.initChart(t))},validateNow:function(){this.listenersAdded=!1;this.write(this.div)},showItem:function(t){t.hidden=!1;this.initChart()},hideItem:function(t){t.hidden=!0;this.initChart()},hideBalloon:function(){var t=this;t.hoverInt=setTimeout(function(){t.hideBalloonReal.call(t)},t.hideBalloonTime)},cleanChart:function(){},hideBalloonReal:function(){var t=this.balloon;t&&t.hide()},showBalloon:function(t,i,e,s,a){var r=this;clearTimeout(r.balloonTO);r.balloonTO=setTimeout(function(){r.showBalloonReal.call(r,t,i,e,s,a)},1)},showBalloonReal:function(t,i,e,s,a){this.handleMouseMove();var r=this.balloon;r.enabled&&(r.followCursor(!1),r.changeColor(i),!e||r.fixedPosition?(r.setPosition(s,a),r.followCursor(!1)):r.followCursor(!0),t&&r.showBalloon(t))},handleTouchMove:function(t){this.hideBalloon();var i=this.chartDiv;t.touches&&(t=t.touches.item(0),this.mouseX=t.pageX-AmCharts.findPosX(i),this.mouseY=t.pageY-AmCharts.findPosY(i))},handleMouseOver:function(t){AmCharts.resetMouseOver();this.mouseIsOver=!0},handleMouseOut:function(t){AmCharts.resetMouseOver();this.mouseIsOver=!1},handleMouseMove:function(t){if(this.mouseIsOver){var i=this.chartDiv;t||(t=window.event);var e,s;if(t){this.posX=AmCharts.findPosX(i);this.posY=AmCharts.findPosY(i);switch(this.mouseMode){case 1:e=t.clientX-this.posX;s=t.clientY-this.posY;if(!this.divIsFixed){var i=document.body,a,r;i&&(a=i.scrollLeft,y1=i.scrollTop);if(i=document.documentElement)r=i.scrollLeft,y2=i.scrollTop;a=Math.max(a,r);r=Math.max(y1,y2);e+=a;s+=r}break;case 0:this.divIsFixed?(e=t.clientX-this.posX,s=t.clientY-this.posY):(e=t.pageX-this.posX,s=t.pageY-this.posY)}t.touches&&(t=t.touches.item(0),e=t.pageX-this.posX,s=t.pageY-this.posY);this.mouseX=e-this.dmouseX;this.mouseY=s-this.dmouseY}}},handleTouchStart:function(t){this.handleMouseDown(t)},handleTouchEnd:function(t){AmCharts.resetMouseOver();this.handleReleaseOutside(t)},handleReleaseOutside:function(t){},handleMouseDown:function(t){AmCharts.resetMouseOver();this.mouseIsOver=!0;t&&t.preventDefault&&t.preventDefault()},addLegend:function(t,i){AmCharts.extend(t,new AmCharts.AmLegend);var e;e="object"!=typeof i?document.getElementById(i):i;this.legend=t;t.chart=this;e?(t.div=e,t.position="outside",t.autoMargins=!1):t.div=this.legendDiv;e=this.handleLegendEvent;this.listenTo(t,"showItem",e);this.listenTo(t,"hideItem",e);this.listenTo(t,"clickMarker",e);this.listenTo(t,"rollOverItem",e);this.listenTo(t,"rollOutItem",e);this.listenTo(t,"rollOverMarker",e);this.listenTo(t,"rollOutMarker",e);this.listenTo(t,"clickLabel",e)},removeLegend:function(){this.legend=void 0;this.legendDiv.innerHTML=""},handleResize:function(){(AmCharts.isPercents(this.width)||AmCharts.isPercents(this.height))&&this.invalidateSizeReal();this.renderFix()},renderFix:function(){if(!AmCharts.VML){var t=this.container;t&&t.renderFix()}},getSVG:function(){if(AmCharts.hasSVG)return this.container},animate:function(t,i,e,s,a,r,h){t["an_"+i]&&AmCharts.removeFromArray(this.animations,t["an_"+i]);e={obj:t,frame:0,attribute:i,from:e,to:s,time:a,effect:r,suffix:h};t["an_"+i]=e;this.animations.push(e);return e},startInterval:function(){var t=this;clearInterval(t.interval);t.interval=setInterval(function(){t.updateAnimations.call(t)},AmCharts.updateRate)},stopAnim:function(t){AmCharts.removeFromArray(this.animations,t)},updateAnimations:function(){var t;this.container&&this.container.update();for(t=this.animations.length-1;0<=t;t--){var i=this.animations[t],e=1e3*i.time/AmCharts.updateRate,s=i.frame+1,a=i.obj,r=i.attribute;if(s<=e){i.frame++;var h=Number(i.from),o=Number(i.to)-h,e=AmCharts[i.effect](0,s,h,o,e);0===o?this.animations.splice(t,1):a.node.style[r]=e+i.suffix}else a.node.style[r]=Number(i.to)+i.suffix,this.animations.splice(t,1)}}});AmCharts.Slice=AmCharts.Class({construct:function(){}});AmCharts.SerialDataItem=AmCharts.Class({construct:function(){}});AmCharts.GraphDataItem=AmCharts.Class({construct:function(){}});AmCharts.Guide=AmCharts.Class({construct:function(){}});AmCharts.AmGraph=AmCharts.Class({construct:function(){this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph");this.type="line";this.stackable=!0;this.columnCount=1;this.columnIndex=0;this.centerCustomBullets=this.showBalloon=!0;this.maxBulletSize=50;this.minBulletSize=0;this.balloonText="[[value]]";this.hidden=this.scrollbar=this.animationPlayed=!1;this.pointPosition="middle";this.depthCount=1;this.includeInMinMax=!0;this.negativeBase=0;this.visibleInLegend=!0;this.showAllValueLabels=!1;this.showBalloonAt="close";this.lineThickness=1;this.dashLength=0;this.connect=!0;this.lineAlpha=1;this.bullet="none";this.bulletBorderThickness=2;this.bulletBorderAlpha=0;this.bulletAlpha=1;this.bulletSize=8;this.hideBulletsCount=this.bulletOffset=0;this.labelPosition="top";this.cornerRadiusTop=0;this.cursorBulletAlpha=1;this.gradientOrientation="vertical";this.dy=this.dx=0;this.periodValue="";this.clustered=!0;this.y=this.x=0},draw:function(){var t=this.chart,i=t.container;this.container=i;this.destroy();var e=i.set(),s=i.set();this.behindColumns?(t.graphsBehindSet.push(e),t.bulletBehindSet.push(s)):(t.graphsSet.push(e),t.bulletSet.push(s));this.bulletSet=s;if(!this.scrollbar){var a=t.marginLeftReal,t=t.marginTopReal;e.translate(a,t);s.translate(a,t)}i=i.set();AmCharts.remove(this.columnsSet);e.push(i);this.set=e;this.columnsSet=i;this.columnsArray=[];this.ownColumns=[];this.allBullets=[];this.animationArray=[];AmCharts.ifArray(this.data)&&(e=!1,"xy"==this.chartType?this.xAxis.axisCreated&&this.yAxis.axisCreated&&(e=!0):this.valueAxis.axisCreated&&(e=!0),!this.hidden&&e&&this.createGraph())},createGraph:function(){var t=this,i=t.chart;"inside"==t.labelPosition&&(t.labelPosition="bottom");t.startAlpha=i.startAlpha;t.seqAn=i.sequencedAnimation;t.baseCoord=t.valueAxis.baseCoord;t.fillColors||(t.fillColors=t.lineColor);void 0===t.fillAlphas&&(t.fillAlphas=0);void 0===t.bulletColor&&(t.bulletColor=t.lineColor,t.bulletColorNegative=t.negativeLineColor);void 0===t.bulletAlpha&&(t.bulletAlpha=t.lineAlpha);clearTimeout(t.playedTO);if(!isNaN(t.valueAxis.min)&&!isNaN(t.valueAxis.max)){switch(t.chartType){case"serial":t.createSerialGraph();"candlestick"==t.type&&1>t.valueAxis.minMaxMultiplier&&t.positiveClip(t.set);break;case"radar":t.createRadarGraph();break;case"xy":t.createXYGraph(),t.positiveClip(t.set)}t.playedTO=setTimeout(function(){t.setAnimationPlayed.call(t)},500*t.chart.startDuration)}},setAnimationPlayed:function(){this.animationPlayed=!0},createXYGraph:function(){var t=[],i=[],e=this.xAxis,s=this.yAxis;this.pmh=s.viH+1;this.pmw=e.viW+1;this.pmy=this.pmx=0;var a;for(a=this.start;a<=this.end;a++){var r=this.data[a].axes[e.id].graphs[this.id],h=r.values,o=h.x,n=h.y,h=e.getCoordinate(o),l=s.getCoordinate(n);!isNaN(o)&&!isNaN(n)&&(t.push(h),i.push(l),(o=this.createBullet(r,h,l,a))||(o=0),n=this.labelText)&&(r=this.createLabel(r,h,l,n),this.allBullets.push(r),this.positionLabel(h,l,r,this.labelPosition,o))}this.drawLineGraph(t,i);this.launchAnimation()},createRadarGraph:function(){var t=this.valueAxis.stackType,i=[],e=[],s,a,r;for(r=this.start;r<=this.end;r++){var h=this.data[r].axes[this.valueAxis.id].graphs[this.id],o;o="none"==t||"3d"==t?h.values.value:h.values.close;if(isNaN(o))this.drawLineGraph(i,e),i=[],e=[];else{var n=this.y-(this.valueAxis.getCoordinate(o)-this.height),l=180-360/(this.end-this.start+1)*r;o=n*Math.sin(l/180*Math.PI);n*=Math.cos(l/180*Math.PI);i.push(o);e.push(n);(l=this.createBullet(h,o,n,r))||(l=0);var d=this.labelText;d&&(h=this.createLabel(h,o,n,d),this.allBullets.push(h),this.positionLabel(o,n,h,this.labelPosition,l));isNaN(s)&&(s=o);isNaN(a)&&(a=n)}}i.push(s);e.push(a);this.drawLineGraph(i,e);this.launchAnimation()},positionLabel:function(t,i,e,s,a){var r=e.getBBox();switch(s){case"left":t-=(r.width+a)/2+2;break;case"top":i-=(a+r.height)/2+1;break;case"right":t+=(r.width+a)/2+2;break;case"bottom":i+=(a+r.height)/2+1}e.translate(t,i)},getGradRotation:function(){var t=270;"horizontal"==this.gradientOrientation&&(t=0);return this.gradientRotation=t},createSerialGraph:function(){this.dashLengthSwitched=this.fillColorsSwitched=this.lineColorSwitched=void 0;var t=this.chart,i=this.id,e=this.index,s=this.data,a=this.chart.container,r=this.valueAxis,h=this.type,o=this.columnWidthReal;isNaN(this.columnWidth)||(o=this.columnWidth);var n=this.width,l=this.height,d=this.y,u=this.rotate,c=this.columnCount,m=AmCharts.toCoordinate(this.cornerRadiusTop,o/2),p=this.connect,f=[],g=[],v,C,A,b,x=this.chart.graphs.length,y,w=this.dx/this.depthCount,M=this.dy/this.depthCount,N=r.stackType,S=this.labelPosition,T=this.start,L=this.end,B=this.scrollbar,D=this.categoryAxis,k=this.baseCoord,O=this.negativeBase,R=this.columnIndex,F=this.lineThickness,I=this.lineAlpha,z=this.lineColor,G=this.dashLength,P=this.set;"above"==S&&(S="top");"below"==S&&(S="bottom");var E=S,Y=this.getGradRotation(),W=this.chart.columnSpacing,V=D.cellWidth,H=(V*o-c)/c;W>H&&(W=H);var X,j,U,Z=l+1,q=n+1,_=0,K=0,Q,J,$,tt,it=this.fillColors,et=this.negativeFillColors,st=this.negativeLineColor,at=this.fillAlphas,rt=this.negativeFillAlphas;"object"==typeof at&&(at=at[0]);"object"==typeof rt&&(rt=rt[0]);var ht=r.getCoordinate(r.min);r.logarithmic&&(ht=r.getCoordinate(r.minReal));this.minCoord=ht;this.resetBullet&&(this.bullet="none");if(!B&&("line"==h||"smoothedLine"==h||"step"==h)&&(1==s.length&&"step"!=h&&"none"==this.bullet&&(this.bullet="round",this.resetBullet=!0),et||void 0!=st)){var ot=O;ot>r.max&&(ot=r.max);ot<r.min&&(ot=r.min);r.logarithmic&&(ot=r.minReal);var nt=r.getCoordinate(ot),lt=r.getCoordinate(r.max);u?(Z=l,q=Math.abs(lt-nt),Q=l,J=Math.abs(ht-nt),tt=K=0,r.reversed?(_=0,$=nt):(_=nt,$=0)):(q=n,Z=Math.abs(lt-nt),J=n,Q=Math.abs(ht-nt),$=_=0,r.reversed?(tt=d,K=nt):tt=nt+1)}var dt=Math.round;this.pmx=dt(_);this.pmy=dt(K);this.pmh=dt(Z);this.pmw=dt(q);this.nmx=dt($);this.nmy=dt(tt);this.nmh=dt(Q);this.nmw=dt(J);AmCharts.isModern||(this.nmy=this.nmx=0,this.nmh=this.height);o="column"==h?(V*o-W*(c-1))/c:V*o;1>o&&(o=1);var ut;if("line"==h||"step"==h||"smoothedLine"==h){if(0<T)for(ut=T-1;-1<ut;ut--)if(X=s[ut],j=X.axes[r.id].graphs[i],U=j.values.value,!isNaN(U)){T=ut;break}if(L<s.length-1)for(ut=L+1;ut<s.length;ut++)if(X=s[ut],j=X.axes[r.id].graphs[i],U=j.values.value,!isNaN(U)){L=ut;break}}L<s.length-1&&L++;var ct=[],mt=[],pt=!1;if("line"==h||"step"==h||"smoothedLine"==h)if(this.stackable&&"regular"==N||"100%"==N||this.fillToGraph)pt=!0;var ft=this.noStepRisers;for(ut=T;ut<=L;ut++){X=s[ut];j=X.axes[r.id].graphs[i];j.index=ut;var gt,vt,Ct,At,bt=NaN,xt=NaN,yt=NaN,wt=NaN,Mt=NaN,Nt=NaN,St=NaN,Tt=NaN,Lt=NaN,Bt=NaN,Dt=NaN,kt=NaN,Ot=NaN,Rt=NaN,Ft=NaN,It=NaN,zt=NaN,Gt=void 0,Pt=it,Et=at,Yt=z,Wt,Vt;void 0!=j.color&&(Pt=j.color);j.fillColors&&(Pt=j.fillColors);isNaN(j.alpha)||(Et=j.alpha);isNaN(j.dashLength)||(G=j.dashLength);var Ht=j.values;r.recalculateToPercents&&(Ht=j.percents);if(Ht){Rt=this.stackable&&"none"!=N&&"3d"!=N?Ht.close:Ht.value;if("candlestick"==h||"ohlc"==h)Rt=Ht.close,It=Ht.low,St=r.getCoordinate(It),Ft=Ht.high,Lt=r.getCoordinate(Ft);zt=Ht.open;yt=r.getCoordinate(Rt);isNaN(zt)||(Mt=r.getCoordinate(zt));if(!B)switch(this.showBalloonAt){case"close":j.y=yt;break;case"open":j.y=Mt;break;case"high":j.y=Lt;break;case"low":j.y=St}var bt=X.x[D.id],Xt=Math.floor(V/2),jt=Xt;"start"==this.pointPosition&&(bt-=V/2,Xt=0,jt=V);if(ft){var Ut=this.columnWidth;isNaN(Ut)||(Xt*=Ut,jt*=Ut)}B||(j.x=bt);-1e5>bt&&(bt=-1e5);bt>n+1e5&&(bt=n+1e5);u?(xt=yt,wt=Mt,Mt=yt=bt,isNaN(zt)&&!this.fillToGraph&&(wt=k),Nt=St,Tt=Lt):(wt=xt=bt,isNaN(zt)&&!this.fillToGraph&&(Mt=k));Rt<zt&&(j.isNegative=!0,et&&(Pt=et),rt&&(Et=rt),void 0!=st&&(Yt=st));switch(h){case"line":isNaN(Rt)?p||(this.drawLineGraph(f,g,ct,mt),f=[],g=[],ct=[],mt=[]):(j.isNegative=Rt<O?!0:!1,f.push(xt),g.push(yt),Bt=xt,Dt=yt,kt=xt,Ot=yt,!pt||isNaN(Mt)||isNaN(wt)||(ct.push(wt),mt.push(Mt)),void 0==j.lineColor&&void 0==j.fillColors&&isNaN(j.dashLength)||(this.drawLineGraph(f,g,ct,mt),f=[xt],g=[yt],ct=[],mt=[],this.lineColorSwitched=j.lineColor,this.fillColorsSwitched=j.fillColors,this.dashLengthSwitched=j.dashLength));break;case"smoothedLine":isNaN(Rt)?p||(this.drawSmoothedGraph(f,g,ct,mt),f=[],g=[],ct=[],mt=[]):(j.isNegative=Rt<O?!0:!1,f.push(xt),g.push(yt),Bt=xt,Dt=yt,kt=xt,Ot=yt,!pt||isNaN(Mt)||isNaN(wt)||(ct.push(wt),mt.push(Mt)),void 0==j.lineColor&&void 0==j.fillColors&&isNaN(j.dashLength)||(this.drawSmoothedGraph(f,g,ct,mt),f=[xt],g=[yt],ct=[],mt=[],this.lineColorSwitched=j.lineColor,this.fillColorsSwitched=j.fillColors,this.dashLengthSwitched=j.dashLength));break;case"step":isNaN(Rt)?p||(v=C=NaN,this.drawLineGraph(f,g,ct,mt),f=[],g=[],ct=[],mt=[]):(j.isNegative=Rt<O?!0:!1,void 0==j.lineColor&&void 0==j.fillColors&&isNaN(j.dashLength)||(this.drawLineGraph(f,g,ct,mt),f=[],g=[],ct=[],mt=[],this.lineColorSwitched=j.lineColor,this.fillColorsSwitched=j.fillColors,this.dashLengthSwitched=j.dashLength),u?(isNaN(v)||(f.push(v),g.push(yt-Xt)),g.push(yt-Xt),f.push(xt),g.push(yt+jt),f.push(xt),!pt||isNaN(Mt)||isNaN(wt)||(ct.push(A),mt.push(Mt-Xt),ct.push(wt),mt.push(Mt-Xt),ct.push(wt),mt.push(Mt+jt))):(isNaN(C)||(g.push(C),f.push(xt-Xt)),f.push(xt-Xt),g.push(yt),f.push(xt+jt),g.push(yt),!pt||isNaN(Mt)||isNaN(wt)||(ct.push(wt-Xt),mt.push(b),ct.push(wt-Xt),mt.push(Mt),ct.push(wt+jt),mt.push(Mt))),v=xt,C=yt,A=wt,b=Mt,Bt=xt,Dt=yt,kt=xt,Ot=yt,ft&&(v=C=NaN,this.drawLineGraph(f,g,ct,mt),f=[],g=[],ct=[],mt=[]));break;case"column":Wt=Yt;void 0!=j.lineColor&&(Wt=j.lineColor);if(!isNaN(Rt)){Rt<O?(j.isNegative=!0,et&&(Pt=et),void 0!=st&&(Wt=st)):j.isNegative=!1;var Zt=r.min,qt=r.max;if(!(Rt<Zt&&zt<Zt||Rt>qt&&zt>qt))if(u){"3d"==N?(vt=yt-.5*(o+W)+W/2+M*R,gt=wt+w*R):(vt=yt-(c/2-R)*(o+W)+W/2,gt=wt);Ct=o;Bt=xt;Dt=vt+o/2;kt=xt;Ot=vt+o/2;vt+Ct>l&&(Ct=l-vt);0>vt&&(Ct+=vt,vt=0);At=xt-wt;var _t=gt;gt=AmCharts.fitToBounds(gt,0,n);At+=_t-gt;At=AmCharts.fitToBounds(At,-gt,n-gt+w*R);if(vt<l&&0<Ct&&(Gt=new AmCharts.Cuboid(a,At,Ct,w-t.d3x,M-t.d3y,Pt,Et,F,Wt,I,Y,m,u,G),"bottom"!=S))if(S=r.reversed?"left":"right",0>Rt)S=r.reversed?"right":"left";else if("regular"==N||"100%"==N)Bt+=this.dx}else{"3d"==N?(gt=xt-.5*(o+W)+W/2+w*R,vt=Mt+M*R):(gt=xt-(c/2-R)*(o+W)+W/2,vt=Mt);Ct=o;Bt=gt+o/2;Dt=yt;kt=gt+o/2;Ot=yt;gt+Ct>n+R*w&&(Ct=n-gt+R*w);0>gt&&(Ct+=gt,gt=0);At=yt-Mt;var Kt=vt;vt=AmCharts.fitToBounds(vt,this.dy,l);At+=Kt-vt;At=AmCharts.fitToBounds(At,-vt+M*R,l-vt);if(gt<n+R*w&&0<Ct)if(Gt=new AmCharts.Cuboid(a,Ct,At,w-t.d3x,M-t.d3y,Pt,Et,F,Wt,this.lineAlpha,Y,m,u,G),0>Rt&&"middle"!=S)S="bottom";else if(S=E,"regular"==N||"100%"==N)Dt+=this.dy}if(Gt&&(Vt=Gt.set,Vt.translate(gt,vt),this.columnsSet.push(Vt),(j.url||this.showHandOnHover)&&Vt.setAttr("cursor","pointer"),!B)){"none"==N&&(y=u?(this.end+1-ut)*x-e:x*ut+e);"3d"==N&&(u?(y=(x-e)*(this.end+1-ut),Bt+=w*this.columnIndex,kt+=w*this.columnIndex,j.y+=w*this.columnIndex):(y=(x-e)*(ut+1),Bt+=3,Dt+=M*this.columnIndex+7,Ot+=M*this.columnIndex,j.y+=M*this.columnIndex));if("regular"==N||"100%"==N)S="middle",y=u?0<Ht.value?(this.end+1-ut)*x+e:(this.end+1-ut)*x-e:0<Ht.value?x*ut+e:x*ut-e;this.columnsArray.push({column:Gt,depth:y});j.x=u?vt+Ct/2:gt+Ct/2;this.ownColumns.push(Gt);this.animateColumns(Gt,ut,xt,wt,yt,Mt);this.addListeners(Vt,j)}}break;case"candlestick":if(!isNaN(zt)&&!isNaN(Rt)){var Qt,Jt;Wt=Yt;void 0!=j.lineColor&&(Wt=j.lineColor);if(u){if(vt=yt-o/2,gt=wt,Ct=o,vt+Ct>l&&(Ct=l-vt),0>vt&&(Ct+=vt,vt=0),vt<l&&0<Ct){var $t,ti;Rt>zt?($t=[xt,Tt],ti=[wt,Nt]):($t=[wt,Tt],ti=[xt,Nt]);!isNaN(Tt)&&!isNaN(Nt)&&yt<l&&0<yt&&(Qt=AmCharts.line(a,$t,[yt,yt],Wt,I,F),Jt=AmCharts.line(a,ti,[yt,yt],Wt,I,F));At=xt-wt;Gt=new AmCharts.Cuboid(a,At,Ct,w,M,Pt,at,F,Wt,I,Y,m,u,G)}}else if(gt=xt-o/2,vt=Mt+F/2,Ct=o,gt+Ct>n&&(Ct=n-gt),0>gt&&(Ct+=gt,gt=0),At=yt-Mt,gt<n&&0<Ct){var Gt=new AmCharts.Cuboid(a,Ct,At,w,M,Pt,Et,F,Wt,I,Y,m,u,G),ii,ei;Rt>zt?(ii=[yt,Lt],ei=[Mt,St]):(ii=[Mt,Lt],ei=[yt,St]);!isNaN(Lt)&&!isNaN(St)&&xt<n&&0<xt&&(Qt=AmCharts.line(a,[xt,xt],ii,Wt,I,F),Jt=AmCharts.line(a,[xt,xt],ei,Wt,I,F))}Gt&&(Vt=Gt.set,P.push(Vt),Vt.translate(gt,vt-F/2),(j.url||this.showHandOnHover)&&Vt.setAttr("cursor","pointer"),Qt&&(P.push(Qt),P.push(Jt)),Bt=xt,Dt=yt,kt=xt,Ot=yt,B||(j.x=u?vt+Ct/2:gt+Ct/2,this.animateColumns(Gt,ut,xt,wt,yt,Mt),this.addListeners(Vt,j)))}break;case"ohlc":if(!(isNaN(zt)||isNaN(Ft)||isNaN(It)||isNaN(Rt))){Rt<zt&&(j.isNegative=!0,void 0!=st&&(Yt=st));var si,ai,ri;if(u){var hi=yt-o/2,hi=AmCharts.fitToBounds(hi,0,l),oi=AmCharts.fitToBounds(yt,0,l),ni=yt+o/2,ni=AmCharts.fitToBounds(ni,0,l);ai=AmCharts.line(a,[wt,wt],[hi,oi],Yt,I,F,G);0<yt&&yt<l&&(si=AmCharts.line(a,[Nt,Tt],[yt,yt],Yt,I,F,G));ri=AmCharts.line(a,[xt,xt],[oi,ni],Yt,I,F,G)}else{var li=xt-o/2,li=AmCharts.fitToBounds(li,0,n),di=AmCharts.fitToBounds(xt,0,n),ui=xt+o/2,ui=AmCharts.fitToBounds(ui,0,n);ai=AmCharts.line(a,[li,di],[Mt,Mt],Yt,I,F,G);0<xt&&xt<n&&(si=AmCharts.line(a,[xt,xt],[St,Lt],Yt,I,F,G));ri=AmCharts.line(a,[di,ui],[yt,yt],Yt,I,F,G)}P.push(ai);P.push(si);P.push(ri);Bt=xt;Dt=yt;kt=xt;Ot=yt}}if(!B&&!isNaN(Rt)){var ci=this.hideBulletsCount;if(this.end-this.start<=ci||0===ci){var mi=this.createBullet(j,kt,Ot,ut);mi||(mi=0);var pi=this.labelText;if(pi){var fi=this.createLabel(j,0,0,pi),gi=0,vi=0,Ci=fi.getBBox(),Ai=Ci.width,bi=Ci.height;switch(S){case"left":gi=-(Ai/2+mi/2+3);break;case"top":vi=-(bi/2+mi/2+3);break;case"right":gi=mi/2+2+Ai/2;break;case"bottom":u&&"column"==h?(Bt=k,0>Rt?(gi=-6,fi.attr({"text-anchor":"end"})):(gi=6,fi.attr({"text-anchor":"start"}))):(vi=mi/2+bi/2,fi.x=-(Ai/2+2));break;case"middle":"column"==h&&(u?(vi=-(bi/2)+this.fontSize/2,gi=-(xt-wt)/2-w,0>At&&(gi+=w),Math.abs(xt-wt)<Ai&&!this.showAllValueLabels&&(fi.remove(),fi=null)):(vi=-(yt-Mt)/2,0>At&&(vi-=M),Math.abs(yt-Mt)<bi&&!this.showAllValueLabels&&(fi.remove(),fi=null)))}if(fi){if(isNaN(Dt)||isNaN(Bt))fi.remove(),fi=null;else if(Bt+=gi,Dt+=vi,fi.translate(Bt,Dt),u){if(0>Dt||Dt>l)fi.remove(),fi=null}else{var xi=0;"3d"==N&&(xi=w*R);if(0>Bt||Bt>n+xi)fi.remove(),fi=null}fi&&this.allBullets.push(fi)}}if("column"==h&&"regular"==N||"100%"==N){var yi=r.totalText;if(yi){var wi=this.createLabel(j,0,0,yi,r.totalTextColor);this.allBullets.push(wi);var Mi=wi.getBBox(),Ni=Mi.width,Si=Mi.height,Ti,Li,Bi=r.totals[ut];Bi&&Bi.remove();u?(Li=yt,Ti=0>Rt?xt-Ni/2-2:xt+Ni/2+3):(Ti=xt,Li=0>Rt?yt+Si/2:yt-Si/2-3);wi.translate(Ti,Li);r.totals[ut]=wi;u?(0>Li||Li>l)&&wi.remove():(0>Ti||Ti>n)&&wi.remove()}}}}}}if("line"==h||"step"==h||"smoothedLine"==h)"smoothedLine"==h?this.drawSmoothedGraph(f,g,ct,mt):this.drawLineGraph(f,g,ct,mt),B||this.launchAnimation();this.bulletsHidden&&this.hideBullets()},animateColumns:function(t,i,e,s,a,r){var h=this;e=h.chart.startDuration;0<e&&!h.animationPlayed&&(h.seqAn?(t.set.hide(),h.animationArray.push(t),t=setTimeout(function(){h.animate.call(h)},1e3*(e/(h.end-h.start+1))*(i-h.start)),h.timeOuts.push(t)):h.animate(t))},createLabel:function(t,i,e,s,a){var r=this.chart,h=t.labelColor;h||(h=this.color);h||(h=r.color);a&&(h=a);a=this.fontSize;void 0===a&&(this.fontSize=a=r.fontSize);t=r.formatString(s,t,this);t=AmCharts.cleanFromEmpty(t);r=AmCharts.text(this.container,t,h,r.fontFamily,a);r.translate(i,e);this.bulletSet.push(r);return r},positiveClip:function(t){t.clipRect(this.pmx,this.pmy,this.pmw,this.pmh)},negativeClip:function(t){t.clipRect(this.nmx,this.nmy,this.nmw,this.nmh)},drawLineGraph:function(t,i,e,s){var a=this;if(1<t.length){
var r=a.set,h=a.container,o=h.set(),n=h.set();r.push(n);r.push(o);var l=a.lineAlpha,d=a.lineThickness,r=a.fillAlphas,u=a.lineColor,c=a.lineColorSwitched;c&&(u=c);var c=a.fillColors,m=a.fillColorsSwitched;m&&(c=m);var p=a.dashLength;(m=a.dashLengthSwitched)&&(p=m);var m=a.negativeLineColor,f=a.negativeFillColors,g=a.negativeFillAlphas,v=a.baseCoord;0!==a.negativeBase&&(v=a.valueAxis.getCoordinate(a.negativeBase));u=AmCharts.line(h,t,i,u,l,d,p,!1,!0);o.push(u);o.click(function(){a.handleGraphClick()});void 0!==m&&(l=AmCharts.line(h,t,i,m,l,d,p,!1,!0),n.push(l));if(0<r||0<g)if(l=t.join(";").split(";"),d=i.join(";").split(";"),"serial"==a.chartType&&(0<e.length?(e.reverse(),s.reverse(),l=t.concat(e),d=i.concat(s)):a.rotate?(d.push(d[d.length-1]),l.push(v),d.push(d[0]),l.push(v),d.push(d[0]),l.push(l[0])):(l.push(l[l.length-1]),d.push(v),l.push(l[0]),d.push(v),l.push(t[0]),d.push(d[0]))),0<r&&(t=AmCharts.polygon(h,l,d,c,r,0,0,0,this.gradientRotation),o.push(t)),f||void 0!==m)isNaN(g)&&(g=r),f||(f=m),h=AmCharts.polygon(h,l,d,f,g,0,0,0,this.gradientRotation),n.push(h),n.click(function(){a.handleGraphClick()});a.applyMask(n,o)}},applyMask:function(t,i){var e=t.length();"serial"!=this.chartType||this.scrollbar||(this.positiveClip(i),0<e&&this.negativeClip(t))},drawSmoothedGraph:function(t,i,e,s){if(1<t.length){var a=this.set,r=this.container,h=r.set(),o=r.set();a.push(o);a.push(h);var n=this.lineAlpha,l=this.lineThickness,a=this.dashLength,d=this.fillAlphas,u=this.lineColor,c=this.fillColors,m=this.negativeLineColor,p=this.negativeFillColors,f=this.negativeFillAlphas,g=this.baseCoord,v=this.lineColorSwitched;v&&(u=v);(v=this.fillColorsSwitched)&&(c=v);u=new AmCharts.Bezier(r,t,i,u,n,l,c,0,a);h.push(u.path);void 0!==m&&(n=new AmCharts.Bezier(r,t,i,m,n,l,c,0,a),o.push(n.path));0<d&&(l=t.join(";").split(";"),u=i.join(";").split(";"),n="",0<e.length?(e.reverse(),s.reverse(),l=t.concat(e),u=i.concat(s)):(this.rotate?(n+=" L"+g+","+i[i.length-1],n+=" L"+g+","+i[0]):(n+=" L"+t[t.length-1]+","+g,n+=" L"+t[0]+","+g),n+=" L"+t[0]+","+i[0]),e=new AmCharts.Bezier(r,l,u,NaN,0,0,c,d,a,n),h.push(e.path),p||void 0!==m)&&(f||(f=d),p||(p=m),t=new AmCharts.Bezier(r,t,i,NaN,0,0,p,f,a,n),o.push(t.path));this.applyMask(o,h)}},launchAnimation:function(){var t=this,i=t.chart.startDuration;if(0<i&&!t.animationPlayed){var e=t.set,s=t.bulletSet;AmCharts.VML||(e.attr({opacity:t.startAlpha}),s.attr({opacity:t.startAlpha}));e.hide();s.hide();t.seqAn?(i=setTimeout(function(){t.animateGraphs.call(t)},1e3*t.index*i),t.timeOuts.push(i)):t.animateGraphs()}},animateGraphs:function(){var t=this.chart,i=this.set,e=this.bulletSet,s=this.x,a=this.y;i.show();e.show();var r=t.startDuration,t=t.startEffect;i&&(this.rotate?(i.translate(-1e3,a),e.translate(-1e3,a)):(i.translate(s,-1e3),e.translate(s,-1e3)),i.animate({opacity:1,translate:s+","+a},r,t),e.animate({opacity:1,translate:s+","+a},r,t))},animate:function(t){var i=this.chart,e=this.animationArray;!t&&0<e.length&&(t=e[0],e.shift());e=AmCharts[AmCharts.getEffect(i.startEffect)];i=i.startDuration;t&&(this.rotate?t.animateWidth(i,e):t.animateHeight(i,e),t.set.show())},legendKeyColor:function(){var t=this.legendColor,i=this.lineAlpha;void 0===t&&(t=this.lineColor,0===i&&(i=this.fillColors)&&(t="object"==typeof i?i[0]:i));return t},legendKeyAlpha:function(){var t=this.legendAlpha;void 0===t&&(t=this.lineAlpha,0===t&&this.fillAlphas&&(t=this.fillAlphas),0===t&&(t=this.bulletAlpha),0===t&&(t=1));return t},createBullet:function(t,i,e,s){s=this.container;var a=this.bulletOffset,r=this.bulletSize;isNaN(t.bulletSize)||(r=t.bulletSize);var h=t.values.value;isNaN(this.maxValue)||isNaN(h)||(r=h/this.maxValue*this.maxBulletSize);var o=r;this.bulletAxis&&(r=t.values.error,isNaN(r)||(h=r),r=this.bulletAxis.stepWidth*h);r<this.minBulletSize&&(r=this.minBulletSize);this.rotate?i+=a:e-=a;var n,l=this.bulletColor;t.lineColor&&(this.bulletColorSwitched=t.lineColor);this.bulletColorSwitched&&(l=this.bulletColorSwitched);t.isNegative&&void 0!==this.bulletColorNegative&&(l=this.bulletColorNegative);void 0!==t.color&&(l=t.color);a=this.bullet;t.bullet&&(a=t.bullet);var h=this.bulletBorderThickness,d=this.bulletBorderColor,u=this.bulletBorderAlpha,c=this.bulletAlpha;d||(d=l);var m=t.alpha;isNaN(m)||(c=m);if("none"!=this.bullet||t.bullet)n=AmCharts.bullet(s,a,r,l,c,h,d,u,o);if(this.customBullet||t.customBullet)o=this.customBullet,t.customBullet&&(o=t.customBullet),o&&(n&&n.remove(),"function"==typeof o?(n=new o,n.chart=this.chart,t.bulletConfig&&(n.availableSpace=e,n.graph=this,t.bulletConfig.minCoord=this.minCoord-e,n.bulletConfig=t.bulletConfig),n.write(s),n=n.set):(this.chart.path&&(o=this.chart.path+o),n=s.set(),s=s.image(o,0,0,r,r),n.push(s),this.centerCustomBullets&&s.translate(-r/2,-r/2)));n&&((t.url||this.showHandOnHover)&&n.setAttr("cursor","pointer"),"serial"==this.chartType&&(0>i-0||i-0>this.width||e<-r/2||e-0>this.height)&&(n.remove(),n=null),n&&(this.bulletSet.push(n),n.translate(i,e),this.addListeners(n,t),this.allBullets.push(n)),t.bx=i,t.by=e);t.bulletGraphics=n;return r},showBullets:function(){var t=this.allBullets,i;this.bulletsHidden=!1;for(i=0;i<t.length;i++)t[i].show()},hideBullets:function(){var t=this.allBullets,i;this.bulletsHidden=!0;for(i=0;i<t.length;i++)t[i].hide()},addListeners:function(t,i){var e=this;t.mouseover(function(){e.handleRollOver(i)}).mouseout(function(){e.handleRollOut(i)}).touchend(function(){e.handleRollOver(i)}).touchstart(function(){e.handleRollOver(i)}).click(function(){e.handleClick(i)}).dblclick(function(){e.handleDoubleClick(i)}).contextmenu(function(){e.handleRightClick(i)})},handleRollOver:function(t){if(t){var i=this.chart,e={type:"rollOverGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart};this.fire("rollOverGraphItem",e);i.fire("rollOverGraphItem",e);clearTimeout(i.hoverInt);e=this.showBalloon;i.chartCursor&&"serial"==this.chartType&&(e=!1,!i.chartCursor.valueBalloonsEnabled&&this.showBalloon&&(e=!0));if(e){var e=i.formatString(this.balloonText,t,t.graph),s=this.balloonFunction;s&&(e=s(t,t.graph));e=AmCharts.cleanFromEmpty(e);s=i.getBalloonColor(this,t);i.balloon.showBullet=!1;i.balloon.pointerOrientation="V";var a=t.x,r=t.y;i.rotate&&(a=t.y,r=t.x);i.showBalloon(e,s,!0,a+i.marginLeftReal,r+i.marginTopReal)}}},handleRollOut:function(t){this.chart.hideBalloon();t&&(t={type:"rollOutGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart},this.fire("rollOutGraphItem",t),this.chart.fire("rollOutGraphItem",t))},handleClick:function(t){if(t){var i={type:"clickGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart};this.fire("clickGraphItem",i);this.chart.fire("clickGraphItem",i);AmCharts.getURL(t.url,this.urlTarget)}this.handleGraphClick()},handleGraphClick:function(){var t={type:"clickGraph",graph:this,target:this,chart:this.chart};this.fire("clickGraph",t);this.chart.fire("clickGraph",t)},handleRightClick:function(t){t&&(t={type:"rightClickGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart},this.fire("rightClickGraphItem",t),this.chart.fire("rightClickGraphItem",t))},handleDoubleClick:function(t){t&&(t={type:"doubleClickGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart},this.fire("doubleClickGraphItem",t),this.chart.fire("doubleClickGraphItem",t))},zoom:function(t,i){this.start=t;this.end=i;this.draw()},changeOpacity:function(t){var i=this.set;i&&i.setAttr("opacity",t);if(i=this.ownColumns){var e;for(e=0;e<i.length;e++){var s=i[e].set;s&&s.setAttr("opacity",t)}}(i=this.bulletSet)&&i.setAttr("opacity",t)},destroy:function(){AmCharts.remove(this.set);AmCharts.remove(this.bulletSet);var t=this.timeOuts;if(t){var i;for(i=0;i<t.length;i++)clearTimeout(t[i])}this.timeOuts=[]}});AmCharts.ChartCursor=AmCharts.Class({construct:function(){this.createEvents("changed","zoomed","onHideCursor","draw","selected");this.enabled=!0;this.cursorAlpha=1;this.selectionAlpha=.2;this.cursorColor="#CC0000";this.categoryBalloonAlpha=1;this.color="#FFFFFF";this.type="cursor";this.zoomed=!1;this.zoomable=!0;this.pan=!1;this.categoryBalloonDateFormat="MMM DD, YYYY";this.categoryBalloonEnabled=this.valueBalloonsEnabled=!0;this.rolledOver=!1;this.cursorPosition="middle";this.bulletsEnabled=this.skipZoomDispatch=!1;this.bulletSize=8;this.selectWithoutZooming=this.oneBalloonOnly=!1;this.graphBulletSize=1.7;this.animationDuration=.3},draw:function(){var t=this;t.destroy();var i=t.chart,e=i.container;t.rotate=i.rotate;t.container=e;e=e.set();e.translate(t.x,t.y);t.set=e;i.cursorSet.push(e);e=new AmCharts.AmBalloon;e.chart=i;t.categoryBalloon=e;AmCharts.copyProperties(i.balloon,e);e.cornerRadius=0;e.shadowAlpha=0;e.borderThickness=1;e.borderAlpha=1;e.showBullet=!1;var s=t.categoryBalloonColor;void 0===s&&(s=t.cursorColor);e.fillColor=s;e.fillAlpha=t.categoryBalloonAlpha;e.borderColor=s;e.color=t.color;t.rotate&&(e.pointerOrientation="H");t.prevX=[];t.prevY=[];t.prevTX=[];t.prevTY=[];if(t.valueBalloonsEnabled)for(e=0;e<i.graphs.length;e++)s=new AmCharts.AmBalloon,s.chart=i,AmCharts.copyProperties(i.balloon,s),i.graphs[e].valueBalloon=s;"cursor"==t.type?t.createCursor():t.createCrosshair();t.interval=setInterval(function(){t.detectMovement.call(t)},40)},updateData:function(){var t=this.chart;this.data=t.chartData;this.firstTime=t.firstTime;this.lastTime=t.lastTime},createCursor:function(){var t=this.chart,i=this.cursorAlpha,e=t.categoryAxis,s=e.position,a=e.inside,r=e.axisThickness,h=this.categoryBalloon,o,n,l=t.dx,d=t.dy,u=this.x,c=this.y,m=this.width,p=this.height,t=t.rotate,f=e.tickLength;h.pointerWidth=f;t?(o=[0,m,m+l],n=[0,0,d]):(o=[l,0,0],n=[d,0,p]);this.line=i=AmCharts.line(this.container,o,n,this.cursorColor,i,1);this.set.push(i);t?(a&&(h.pointerWidth=0),"right"==s?a?h.setBounds(u,c+d,u+m+l,c+p+d):h.setBounds(u+m+l+r,c+d,u+m+1e3,c+p+d):a?h.setBounds(u,c,m+u,p+c):h.setBounds(-1e3,-1e3,u-f-r,c+p+15)):(h.maxWidth=m,e.parseDates&&(f=0,h.pointerWidth=0),"top"==s?a?h.setBounds(u+l,c+d,m+l+u,p+c):h.setBounds(u+l,-1e3,m+l+u,c+d-f-r):a?h.setBounds(u,c,m+u,p+c-f):h.setBounds(u,c+p+f+r-1,u+m,c+p+f+r));this.hideCursor()},createCrosshair:function(){var t=this.cursorAlpha,i=this.container,e=AmCharts.line(i,[0,0],[0,this.height],this.cursorColor,t,1),t=AmCharts.line(i,[0,this.width],[0,0],this.cursorColor,t,1);this.set.push(e);this.set.push(t);this.vLine=e;this.hLine=t;this.hideCursor()},detectMovement:function(){var t=this.chart;if(t.mouseIsOver){var i=t.mouseX-this.x,e=t.mouseY-this.y;0<i&&i<this.width&&0<e&&e<this.height?(this.drawing?this.rolledOver||t.setMouseCursor("crosshair"):this.pan&&(this.rolledOver||t.setMouseCursor("move")),this.rolledOver=!0,this.setPosition()):this.rolledOver&&(this.handleMouseOut(),this.rolledOver=!1)}else this.rolledOver&&(this.handleMouseOut(),this.rolledOver=!1)},getMousePosition:function(){var t,i=this.width,e=this.height;t=this.chart;this.rotate?(t=t.mouseY-this.y,0>t&&(t=0),t>e&&(t=e)):(t=t.mouseX-this.x,0>t&&(t=0),t>i&&(t=i));return t},updateCrosshair:function(){var t=this.chart,i=t.mouseX-this.x,e=t.mouseY-this.y,s=this.vLine,a=this.hLine,i=AmCharts.fitToBounds(i,0,this.width),e=AmCharts.fitToBounds(e,0,this.height);0<this.cursorAlpha&&(s.show(),a.show(),s.translate(i,0),a.translate(0,e));this.zooming&&(t.hideXScrollbar&&(i=NaN),t.hideYScrollbar&&(e=NaN),this.updateSelectionSize(i,e));t.mouseIsOver||this.zooming||this.hideCursor()},updateSelectionSize:function(t,i){AmCharts.remove(this.selection);var e=this.selectionPosX,s=this.selectionPosY,a=0,r=0,h=this.width,o=this.height;isNaN(t)||(e>t&&(a=t,h=e-t),e<t&&(a=e,h=t-e),e==t&&(a=t,h=0));isNaN(i)||(s>i&&(r=i,o=s-i),s<i&&(r=s,o=i-s),s==i&&(r=i,o=0));0<h&&0<o&&(e=AmCharts.rect(this.container,h,o,this.cursorColor,this.selectionAlpha),e.translate(a+this.x,r+this.y),this.selection=e)},arrangeBalloons:function(){var t=this.valueBalloons,i=this.x,e=this.y,s=this.height+e;t.sort(this.compareY);var a;for(a=0;a<t.length;a++){var r=t[a].balloon;r.setBounds(i,e,i+this.width,s);r.prevX=this.prevX[a];r.prevY=this.prevY[a];r.prevTX=this.prevTX[a];r.prevTY=this.prevTY[a];r.draw();s=r.yPos-3}this.arrangeBalloons2()},compareY:function(t,i){return t.yy<i.yy?1:-1},arrangeBalloons2:function(){var t=this.valueBalloons;t.reverse();var i,e=this.x,s,a,r=t.length;for(a=0;a<r;a++){var h=t[a].balloon;i=h.bottom;var o=h.bottom-h.yPos,n=r-a-1;0<a&&i-o<s+3&&(h.setBounds(e,s+3,e+this.width,s+o+3),h.prevX=this.prevX[n],h.prevY=this.prevY[n],h.prevTX=this.prevTX[n],h.prevTY=this.prevTY[n],h.draw());h.set&&h.set.show();this.prevX[n]=h.prevX;this.prevY[n]=h.prevY;this.prevTX[n]=h.prevTX;this.prevTY[n]=h.prevTY;s=h.bottom}},showBullets:function(){AmCharts.remove(this.allBullets);var t=this.container,i=t.set();this.set.push(i);this.set.show();this.allBullets=i;var i=this.chart.graphs,e;for(e=0;e<i.length;e++){var s=i[e];if(!s.hidden&&s.balloonText){var a=this.data[this.index].axes[s.valueAxis.id].graphs[s.id],r=a.y;if(!isNaN(r)){var h,o;h=a.x;this.rotate?(o=r,r=h):o=h;s=AmCharts.circle(t,this.bulletSize/2,this.chart.getBalloonColor(s,a),s.cursorBulletAlpha);s.translate(o,r);this.allBullets.push(s)}}}},destroy:function(){this.clear();AmCharts.remove(this.selection);this.selection=null;var t=this.categoryBalloon;t&&t.destroy();this.destroyValueBalloons();AmCharts.remove(this.set)},clear:function(){clearInterval(this.interval)},destroyValueBalloons:function(){var t=this.valueBalloons;if(t){var i;for(i=0;i<t.length;i++)t[i].balloon.hide()}},zoom:function(t,i,e,s){var a=this.chart;this.destroyValueBalloons();this.zooming=!1;var r;this.rotate?this.selectionPosY=r=a.mouseY:this.selectionPosX=r=a.mouseX;this.start=t;this.end=i;this.startTime=e;this.endTime=s;this.zoomed=!0;var h=a.categoryAxis,a=this.rotate;r=this.width;var o=this.height;h.parseDates&&!h.equalSpacing?(t=s-e+h.minDuration(),t=a?o/t:r/t):t=a?o/(i-t):r/(i-t);this.stepWidth=t;this.tempVal=this.valueBalloonsEnabled;this.valueBalloonsEnabled=!1;this.setPosition();this.valueBalloonsEnabled=this.tempVal;this.hideCursor()},hideObj:function(t){t&&t.hide()},hideCursor:function(t){void 0===t&&(t=!0);this.hideObj(this.set);this.hideObj(this.categoryBalloon);this.hideObj(this.line);this.hideObj(this.vLine);this.hideObj(this.hLine);this.hideObj(this.allBullets);this.destroyValueBalloons();this.selectWithoutZooming||AmCharts.remove(this.selection);this.previousIndex=NaN;t&&this.fire("onHideCursor",{type:"onHideCursor",chart:this.chart,target:this});this.drawing||this.chart.setMouseCursor("auto");this.normalizeBulletSize()},setPosition:function(t,i){void 0===i&&(i=!0);if("cursor"==this.type){if(AmCharts.ifArray(this.data)){isNaN(t)&&(t=this.getMousePosition());if((t!=this.previousMousePosition||!0===this.zoomed||this.oneBalloonOnly)&&!isNaN(t)){var e=this.chart.categoryAxis.xToIndex(t);if(e!=this.previousIndex||this.zoomed||"mouse"==this.cursorPosition||this.oneBalloonOnly)this.updateCursor(e,i),this.zoomed=!1}this.previousMousePosition=t}}else this.updateCrosshair()},normalizeBulletSize:function(){var t=this.resizedBullets;if(t)for(var i=0;i<t.length;i++){var e=t[i],s=e.bulletGraphics;s&&s.translate(e.bx,e.by,1)}},updateCursor:function(t,i){var e=this.chart,s=e.mouseX-this.x,a=e.mouseY-this.y;this.drawingNow&&(AmCharts.remove(this.drawingLine),this.drawingLine=AmCharts.line(this.container,[this.x+this.drawStartX,this.x+s],[this.y+this.drawStartY,this.y+a],this.cursorColor,1,1));if(this.enabled){void 0===i&&(i=!0);this.index=t;var r=e.categoryAxis,h=e.dx,o=e.dy,n=this.x,l=this.y,d=this.width,u=this.height,c=this.data[t];if(c){var m=c.x[r.id],p=e.rotate,f=r.inside,g=this.stepWidth,v=this.categoryBalloon,C=this.firstTime,A=this.lastTime,b=this.cursorPosition,x=r.position,y=this.zooming,w=this.panning,M=e.graphs,N=r.axisThickness;if(e.mouseIsOver||y||w||this.forceShow)if(this.forceShow=!1,w){var h=this.panClickPos,e=this.panClickEndTime,y=this.panClickStartTime,S=this.panClickEnd,n=this.panClickStart,s=(p?h-a:h-s)/g;if(!r.parseDates||r.equalSpacing)s=Math.round(s);0!==s&&(h={type:"zoomed",target:this},h.chart=this.chart,r.parseDates&&!r.equalSpacing?(e+s>A&&(s=A-e),y+s<C&&(s=C-y),h.start=y+s,h.end=e+s,this.fire(h.type,h)):S+s>=this.data.length||0>n+s||(h.start=n+s,h.end=S+s,this.fire(h.type,h)))}else{"start"==b&&(m-=r.cellWidth/2);"mouse"==b&&e.mouseIsOver&&(m=p?a-2:s-2);if(p){if(0>m)if(y)m=0;else{this.hideCursor();return}if(m>u+1)if(y)m=u+1;else{this.hideCursor();return}}else{if(0>m)if(y)m=0;else{this.hideCursor();return}if(m>d)if(y)m=d;else{this.hideCursor();return}}0<this.cursorAlpha&&(C=this.line,p?(A=0,g=m+o):(A=m,g=0),b=this.animationDuration,0<b&&!this.zooming?isNaN(this.previousX)?C.translate(A,g):(C.translate(this.previousX,this.previousY),C.animate({translate:A+","+g},b,"easeOutSine")):C.translate(A,g),this.previousX=A,this.previousY=g,C.show());this.linePos=p?m+o:m;y&&(p?this.updateSelectionSize(NaN,m):this.updateSelectionSize(m,NaN));g=!0;y&&(g=!1);this.categoryBalloonEnabled&&g?(p?(f&&("right"==x?v.setBounds(n,l+o,n+d+h,l+m+o):v.setBounds(n,l+o,n+d+h,l+m)),"right"==x?f?v.setPosition(n+d+h,l+m+o):v.setPosition(n+d+h+N,l+m+o):f?v.setPosition(n,l+m):v.setPosition(n-N,l+m)):"top"==x?f?v.setPosition(n+m+h,l+o):v.setPosition(n+m+h,l+o-N+1):f?v.setPosition(n+m,l+u):v.setPosition(n+m,l+u+N-1),(C=this.categoryBalloonFunction)?v.showBalloon(C(c.category)):r.parseDates?(r=AmCharts.formatDate(c.category,this.categoryBalloonDateFormat),-1!=r.indexOf("fff")&&(r=AmCharts.formatMilliseconds(r,c.category)),v.showBalloon(r)):v.showBalloon(c.category)):v.hide();M&&this.bulletsEnabled&&this.showBullets();if(this.oneBalloonOnly){o=Infinity;for(A=0;A<M.length;A++)r=M[A],r.showBalloon&&!r.hidden&&r.balloonText&&(v=c.axes[r.valueAxis.id].graphs[r.id],C=v.y,isNaN(C)||(p?Math.abs(s-C)<o&&(o=Math.abs(s-C),S=r):Math.abs(a-C)<o&&(o=Math.abs(a-C),S=r)));this.mostCloseGraph&&(S=this.mostCloseGraph)}if(t!=this.previousIndex||S!=this.previousMostCloseGraph)if(this.normalizeBulletSize(),this.destroyValueBalloons(),this.resizedBullets=[],M&&this.valueBalloonsEnabled&&g&&e.balloon.enabled){this.valueBalloons=o=[];for(A=0;A<M.length;A++)if(r=M[A],(!this.oneBalloonOnly||r==S)&&r.showBalloon&&!r.hidden&&r.balloonText&&(v=c.axes[r.valueAxis.id].graphs[r.id],C=v.y,!isNaN(C))){f=v.x;g=!0;if(p){if(m=C,0>f||f>u)g=!1}else if(m=f,f=C,0>m||m>d+h)g=!1;g&&(1!=this.graphBulletSize&&AmCharts.isModern&&(g=v.bulletGraphics)&&(g.getBBox(),g.translate(v.bx,v.by,this.graphBulletSize),this.resizedBullets.push(v)),g=r.valueBalloon,x=e.getBalloonColor(r,v),g.setBounds(n,l,n+d,l+u),g.pointerOrientation="H",g.changeColor(x),void 0!==r.balloonAlpha&&(g.fillAlpha=r.balloonAlpha),void 0!==r.balloonTextColor&&(g.color=r.balloonTextColor),g.setPosition(m+n,f+l),m=e.formatString(r.balloonText,v,r),(f=r.balloonFunction)&&(m=f(v,r)),""!==m&&(p?g.showBalloon(m):(g.text=m,g.show=!0)),!p&&g.set&&g.set.hide(),o.push({yy:C,balloon:g}))}p||this.arrangeBalloons()}i?(h={type:"changed"},h.index=t,h.target=this,h.chart=this.chart,h.zooming=y,h.mostCloseGraph=S,h.position=p?a:s,h.target=this,e.fire("changed",h),this.fire("changed",h),this.skipZoomDispatch=!1):(this.skipZoomDispatch=!0,e.updateLegendValues(t));this.previousIndex=t;this.previousMostCloseGraph=S}}}else this.hideCursor()},enableDrawing:function(t){this.enabled=!t;this.hideCursor();this.rolledOver=!1;this.drawing=t},isZooming:function(t){t&&t!=this.zooming&&this.handleMouseDown("fake");t||t==this.zooming||this.handleMouseUp()},handleMouseOut:function(){if(this.enabled)if(this.zooming)this.setPosition();else{this.index=void 0;var t={type:"changed",index:void 0,target:this};t.chart=this.chart;this.fire("changed",t);this.hideCursor()}},handleReleaseOutside:function(){this.handleMouseUp()},handleMouseUp:function(){var t=this.chart,i=this.data,e;if(t){var s=t.mouseX-this.x,a=t.mouseY-this.y;if(this.drawingNow){this.drawingNow=!1;AmCharts.remove(this.drawingLine);e=this.drawStartX;var r=this.drawStartY;if(2<Math.abs(e-s)||2<Math.abs(r-a))e={type:"draw",target:this,chart:t,initialX:e,initialY:r,finalX:s,finalY:a},this.fire(e.type,e)}if(this.enabled&&0<i.length){if(this.pan)this.rolledOver=!1;else if(this.zoomable&&this.zooming){e=this.selectWithoutZooming?{type:"selected"}:{type:"zoomed"};e.target=this;e.chart=t;if("cursor"==this.type)this.rotate?this.selectionPosY=a:this.selectionPosX=a=s,2>Math.abs(a-this.initialMouse)&&this.fromIndex==this.index||(this.index<this.fromIndex?(e.end=this.fromIndex,e.start=this.index):(e.end=this.index,e.start=this.fromIndex),a=t.categoryAxis,a.parseDates&&!a.equalSpacing&&(e.start=i[e.start].time,e.end=t.getEndTime(i[e.end].time)),this.skipZoomDispatch||this.fire(e.type,e));else{var h=this.initialMouseX,o=this.initialMouseY;3>Math.abs(s-h)&&3>Math.abs(a-o)||(i=Math.min(h,s),r=Math.min(o,a),s=Math.abs(h-s),a=Math.abs(o-a),t.hideXScrollbar&&(i=0,s=this.width),t.hideYScrollbar&&(r=0,a=this.height),e.selectionHeight=a,e.selectionWidth=s,e.selectionY=r,e.selectionX=i,this.skipZoomDispatch||this.fire(e.type,e))}this.selectWithoutZooming||AmCharts.remove(this.selection)}this.panning=this.zooming=this.skipZoomDispatch=!1}}},showCursorAt:function(t){var i=this.chart.categoryAxis;t=i.parseDates?i.dateToCoordinate(t):i.categoryToCoordinate(t);this.previousMousePosition=NaN;this.forceShow=!0;this.setPosition(t,!1)},handleMouseDown:function(t){if(this.zoomable||this.pan||this.drawing){var i=this.rotate,e=this.chart,s=e.mouseX-this.x,a=e.mouseY-this.y;if(0<s&&s<this.width&&0<a&&a<this.height||"fake"==t)this.setPosition(),this.selectWithoutZooming&&AmCharts.remove(this.selection),this.drawing?(this.drawStartY=a,this.drawStartX=s,this.drawingNow=!0):this.pan?(this.zoomable=!1,e.setMouseCursor("move"),this.panning=!0,this.panClickPos=i?a:s,this.panClickStart=this.start,this.panClickEnd=this.end,this.panClickStartTime=this.startTime,this.panClickEndTime=this.endTime):this.zoomable&&("cursor"==this.type?(this.fromIndex=this.index,i?(this.initialMouse=a,this.selectionPosY=this.linePos):(this.initialMouse=s,this.selectionPosX=this.linePos)):(this.initialMouseX=s,this.initialMouseY=a,this.selectionPosX=s,this.selectionPosY=a),this.zooming=!0)}}});AmCharts.SimpleChartScrollbar=AmCharts.Class({construct:function(){this.createEvents("zoomed");this.backgroundColor="#D4D4D4";this.backgroundAlpha=1;this.selectedBackgroundColor="#EFEFEF";this.scrollDuration=this.selectedBackgroundAlpha=1;this.resizeEnabled=!0;this.hideResizeGrips=!1;this.scrollbarHeight=20;this.updateOnReleaseOnly=!1;9>document.documentMode&&(this.updateOnReleaseOnly=!0);this.dragIconWidth=18;this.dragIconHeight=25},draw:function(){var t=this;t.destroy();t.interval=setInterval(function(){t.updateScrollbar.call(t)},40);var i=t.chart.container,e=t.rotate,s=t.chart,a=i.set();t.set=a;s.scrollbarsSet.push(a);var r,h;e?(r=t.scrollbarHeight,h=s.plotAreaHeight):(h=t.scrollbarHeight,r=s.plotAreaWidth);t.width=r;if((t.height=h)&&r){var o=AmCharts.rect(i,r,h,t.backgroundColor,t.backgroundAlpha,1,t.backgroundColor,t.backgroundAlpha);t.bg=o;a.push(o);o=AmCharts.rect(i,r,h,"#000",.005);a.push(o);t.invisibleBg=o;o.click(function(){t.handleBgClick()}).mouseover(function(){t.handleMouseOver()}).mouseout(function(){t.handleMouseOut()}).touchend(function(){t.handleBgClick()});o=AmCharts.rect(i,r,h,t.selectedBackgroundColor,t.selectedBackgroundAlpha);t.selectedBG=o;a.push(o);r=AmCharts.rect(i,r,h,"#000",.005);t.dragger=r;a.push(r);r.mousedown(function(i){t.handleDragStart(i)}).mouseup(function(){t.handleDragStop()}).mouseover(function(){t.handleDraggerOver()}).mouseout(function(){t.handleMouseOut()}).touchstart(function(i){t.handleDragStart(i)}).touchend(function(){t.handleDragStop()});r=s.pathToImages;e?(o=r+"dragIconH.gif",r=t.dragIconWidth,e=t.dragIconHeight):(o=r+"dragIcon.gif",e=t.dragIconWidth,r=t.dragIconHeight);h=i.image(o,0,0,e,r);var o=i.image(o,0,0,e,r),n=10,l=20;s.panEventsEnabled&&(n=25,l=t.scrollbarHeight);var d=AmCharts.rect(i,n,l,"#000",.005),u=AmCharts.rect(i,n,l,"#000",.005);u.translate(-(n-e)/2,-(l-r)/2);d.translate(-(n-e)/2,-(l-r)/2);e=i.set([h,u]);i=i.set([o,d]);t.iconLeft=e;a.push(t.iconLeft);t.iconRight=i;a.push(i);e.mousedown(function(){t.leftDragStart()}).mouseup(function(){t.leftDragStop()}).mouseover(function(){t.iconRollOver()}).mouseout(function(){t.iconRollOut()}).touchstart(function(i){t.leftDragStart()}).touchend(function(){t.leftDragStop()});i.mousedown(function(){t.rightDragStart()}).mouseup(function(){t.rightDragStop()}).mouseover(function(){t.iconRollOver()}).mouseout(function(){t.iconRollOut()}).touchstart(function(i){t.rightDragStart()}).touchend(function(){t.rightDragStop()});AmCharts.ifArray(s.chartData)?a.show():a.hide();t.hideDragIcons()}a.translate(t.x,t.y);t.clipDragger(!1)},updateScrollbarSize:function(t,i){var e=this.dragger,s,a,r,h;this.rotate?(s=0,a=t,r=this.width+1,h=i-t,e.setAttr("height",i-t),e.setAttr("y",a)):(s=t,a=0,r=i-t,h=this.height+1,e.setAttr("width",i-t),e.setAttr("x",s));this.clipAndUpdate(s,a,r,h)},updateScrollbar:function(){var t,i=!1,e,s,a=this.x,r=this.y,h=this.dragger,o=this.getDBox();e=o.x+a;s=o.y+r;var n=o.width,o=o.height,l=this.rotate,d=this.chart,u=this.width,c=this.height,m=d.mouseX,p=d.mouseY;t=this.initialMouse;d.mouseIsOver&&(this.dragging&&(d=this.initialCoord,l?(t=d+(p-t),0>t&&(t=0),d=c-o,t>d&&(t=d),h.setAttr("y",t)):(t=d+(m-t),0>t&&(t=0),d=u-n,t>d&&(t=d),h.setAttr("x",t))),this.resizingRight&&(l?(t=p-s,t+s>c+r&&(t=c-s+r),0>t?(this.resizingRight=!1,i=this.resizingLeft=!0):(0===t&&(t=.1),h.setAttr("height",t))):(t=m-e,t+e>u+a&&(t=u-e+a),0>t?(this.resizingRight=!1,i=this.resizingLeft=!0):(0===t&&(t=.1),h.setAttr("width",t)))),this.resizingLeft&&(l?(e=s,s=p,s<r&&(s=r),s>c+r&&(s=c+r),t=!0===i?e-s:o+e-s,0>t?(this.resizingRight=!0,this.resizingLeft=!1,h.setAttr("y",e+o-r)):(0===t&&(t=.1),h.setAttr("y",s-r),h.setAttr("height",t))):(s=m,s<a&&(s=a),s>u+a&&(s=u+a),t=!0===i?e-s:n+e-s,0>t?(this.resizingRight=!0,this.resizingLeft=!1,h.setAttr("x",e+n-a)):(0===t&&(t=.1),h.setAttr("x",s-a),h.setAttr("width",t)))),this.clipDragger(!0))},clipDragger:function(t){var i=this.getDBox(),e=i.x,s=i.y,a=i.width,i=i.height,r=!1;if(this.rotate){if(e=0,a=this.width+1,this.clipY!=s||this.clipH!=i)r=!0}else if(s=0,i=this.height+1,this.clipX!=e||this.clipW!=a)r=!0;r&&(this.clipAndUpdate(e,s,a,i),t&&(this.updateOnReleaseOnly||this.dispatchScrollbarEvent()))},maskGraphs:function(){},clipAndUpdate:function(t,i,e,s){this.clipX=t;this.clipY=i;this.clipW=e;this.clipH=s;this.selectedBG.clipRect(t,i,e,s);this.updateDragIconPositions();this.maskGraphs(t,i,e,s)},dispatchScrollbarEvent:function(){if(this.skipEvent)this.skipEvent=!1;else{var t=this.chart;t.hideBalloon();var i=this.getDBox(),e=i.x,s=i.y,a=i.width,i=i.height;this.rotate?(e=s,a=this.height/i):a=this.width/a;t={type:"zoomed",position:e,chart:t,target:this,multiplier:a};this.fire(t.type,t)}},updateDragIconPositions:function(){var t=this.getDBox(),i=t.x,e=t.y,s=this.iconLeft,a=this.iconRight,r,h,o=this.scrollbarHeight;this.rotate?(r=this.dragIconWidth,h=this.dragIconHeight,s.translate((o-h)/2,e-r/2),a.translate((o-h)/2,e+t.height-r/2)):(r=this.dragIconHeight,h=this.dragIconWidth,s.translate(i-h/2,(o-r)/2),a.translate(i+-h/2+t.width,(o-r)/2))},showDragIcons:function(){this.resizeEnabled&&(this.iconLeft.show(),this.iconRight.show())},hideDragIcons:function(){this.resizingLeft||this.resizingRight||this.dragging||(this.hideResizeGrips&&(this.iconLeft.hide(),this.iconRight.hide()),this.removeCursors())},removeCursors:function(){this.chart.setMouseCursor("auto")},relativeZoom:function(t,i){this.dragger.stop();this.multiplier=t;this.position=i;this.updateScrollbarSize(i,this.rotate?i+this.height/t:i+this.width/t)},destroy:function(){this.clear();AmCharts.remove(this.set)},clear:function(){clearInterval(this.interval)},handleDragStart:function(){var t=this.chart;this.dragger.stop();this.removeCursors();this.dragging=!0;var i=this.getDBox();this.rotate?(this.initialCoord=i.y,this.initialMouse=t.mouseY):(this.initialCoord=i.x,this.initialMouse=t.mouseX)},handleDragStop:function(){this.updateOnReleaseOnly&&(this.updateScrollbar(),this.skipEvent=!1,this.dispatchScrollbarEvent());this.dragging=!1;this.mouseIsOver&&this.removeCursors();this.updateScrollbar()},handleDraggerOver:function(){this.handleMouseOver()},leftDragStart:function(){this.dragger.stop();this.resizingLeft=!0},leftDragStop:function(){this.resizingLeft=!1;this.mouseIsOver||this.removeCursors();this.updateOnRelease()},rightDragStart:function(){this.dragger.stop();this.resizingRight=!0},rightDragStop:function(){this.resizingRight=!1;this.mouseIsOver||this.removeCursors();this.updateOnRelease()},iconRollOut:function(){this.removeCursors()},iconRollOver:function(){this.rotate?this.chart.setMouseCursor("n-resize"):this.chart.setMouseCursor("e-resize");this.handleMouseOver()},getDBox:function(){return this.dragger.getBBox()},handleBgClick:function(){if(!this.resizingRight&&!this.resizingLeft){this.zooming=!0;var t,i,e=this.scrollDuration,s=this.dragger;t=this.getDBox();var a=t.height,r=t.width;i=this.chart;var h=this.y,o=this.x,n=this.rotate;n?(t="y",i=i.mouseY-a/2-h,i=AmCharts.fitToBounds(i,0,this.height-a)):(t="x",i=i.mouseX-r/2-o,i=AmCharts.fitToBounds(i,0,this.width-r));this.updateOnReleaseOnly?(this.skipEvent=!1,s.setAttr(t,i),this.dispatchScrollbarEvent(),this.clipDragger()):(i=Math.round(i),n?s.animate({y:i},e,">"):s.animate({x:i},e,">"))}},updateOnRelease:function(){this.updateOnReleaseOnly&&(this.updateScrollbar(),this.skipEvent=!1,this.dispatchScrollbarEvent())},handleReleaseOutside:function(){if(this.set){if(this.resizingLeft||this.resizingRight||this.dragging)this.updateOnRelease(),this.removeCursors();this.mouseIsOver=this.dragging=this.resizingRight=this.resizingLeft=!1;this.hideDragIcons();this.updateScrollbar()}},handleMouseOver:function(){this.mouseIsOver=!0;this.showDragIcons()},handleMouseOut:function(){this.mouseIsOver=!1;this.hideDragIcons()}});AmCharts.ChartScrollbar=AmCharts.Class({inherits:AmCharts.SimpleChartScrollbar,construct:function(){AmCharts.ChartScrollbar.base.construct.call(this);this.graphLineColor="#BBBBBB";this.graphLineAlpha=0;this.graphFillColor="#BBBBBB";this.graphFillAlpha=1;this.selectedGraphLineColor="#888888";this.selectedGraphLineAlpha=0;this.selectedGraphFillColor="#888888";this.selectedGraphFillAlpha=1;this.gridCount=0;this.gridColor="#FFFFFF";this.gridAlpha=.7;this.skipEvent=this.autoGridCount=!1;this.color="#FFFFFF";this.scrollbarCreated=!1},init:function(){var t=this.categoryAxis,i=this.chart;t||(this.categoryAxis=t=new AmCharts.CategoryAxis);t.chart=i;t.id="scrollbar";t.dateFormats=i.categoryAxis.dateFormats;t.boldPeriodBeginning=i.categoryAxis.boldPeriodBeginning;t.axisItemRenderer=AmCharts.RecItem;t.axisRenderer=AmCharts.RecAxis;t.guideFillRenderer=AmCharts.RecFill;t.inside=!0;t.fontSize=this.fontSize;t.tickLength=0;t.axisAlpha=0;if(t=this.graph){var e=this.valueAxis;e||(this.valueAxis=e=new AmCharts.ValueAxis,e.visible=!1,e.scrollbar=!0,e.axisItemRenderer=AmCharts.RecItem,e.axisRenderer=AmCharts.RecAxis,e.guideFillRenderer=AmCharts.RecFill,e.labelsEnabled=!1,e.chart=i);i=this.unselectedGraph;i||(i=new AmCharts.AmGraph,i.scrollbar=!0,this.unselectedGraph=i,i.negativeBase=t.negativeBase,i.noStepRisers=t.noStepRisers);i=this.selectedGraph;i||(i=new AmCharts.AmGraph,i.scrollbar=!0,this.selectedGraph=i,i.negativeBase=t.negativeBase,i.noStepRisers=t.noStepRisers)}this.scrollbarCreated=!0},draw:function(){var t=this;AmCharts.ChartScrollbar.base.draw.call(t);t.scrollbarCreated||t.init();var i=t.chart,e=i.chartData,s=t.categoryAxis,a=t.rotate,r=t.x,h=t.y,o=t.width,n=t.height,l=i.categoryAxis,d=t.set;s.setOrientation(!a);s.parseDates=l.parseDates;s.rotate=a;s.equalSpacing=l.equalSpacing;s.minPeriod=l.minPeriod;s.startOnAxis=l.startOnAxis;s.viW=o;s.viH=n;s.width=o;s.height=n;s.gridCount=t.gridCount;s.gridColor=t.gridColor;s.gridAlpha=t.gridAlpha;s.color=t.color;s.autoGridCount=t.autoGridCount;s.parseDates&&!s.equalSpacing&&s.timeZoom(i.firstTime,i.lastTime);s.zoom(0,e.length-1);if(l=t.graph){var u=t.valueAxis,c=l.valueAxis;u.id=c.id;u.rotate=a;u.setOrientation(a);u.width=o;u.height=n;u.viW=o;

u.viH=n;u.dataProvider=e;u.reversed=c.reversed;u.logarithmic=c.logarithmic;u.gridAlpha=0;u.axisAlpha=0;d.push(u.set);a?u.y=h:u.x=r;var r=Infinity,h=-Infinity,m;for(m=0;m<e.length;m++){var p=e[m].axes[c.id].graphs[l.id].values,f;for(f in p)if(p.hasOwnProperty(f)&&"percents"!=f&&"total"!=f){var g=p[f];g<r&&(r=g);g>h&&(h=g)}}Infinity!=r&&(u.minimum=r);-Infinity!=h&&(u.maximum=h+.1*(h-r));r==h&&(u.minimum-=1,u.maximum+=1);void 0!==t.minimum&&(u.minimum=t.minimum);void 0!==t.maximum&&(u.maximum=t.maximum);u.zoom(0,e.length-1);f=t.unselectedGraph;f.id=l.id;f.rotate=a;f.chart=i;f.chartType=i.chartType;f.data=e;f.valueAxis=u;f.chart=l.chart;f.categoryAxis=t.categoryAxis;f.valueField=l.valueField;f.openField=l.openField;f.closeField=l.closeField;f.highField=l.highField;f.lowField=l.lowField;f.lineAlpha=t.graphLineAlpha;f.lineColor=t.graphLineColor;f.fillAlphas=t.graphFillAlpha;f.fillColors=t.graphFillColor;f.connect=l.connect;f.hidden=l.hidden;f.width=o;f.height=n;c=t.selectedGraph;c.id=l.id;c.rotate=a;c.chart=i;c.chartType=i.chartType;c.data=e;c.valueAxis=u;c.chart=l.chart;c.categoryAxis=s;c.valueField=l.valueField;c.openField=l.openField;c.closeField=l.closeField;c.highField=l.highField;c.lowField=l.lowField;c.lineAlpha=t.selectedGraphLineAlpha;c.lineColor=t.selectedGraphLineColor;c.fillAlphas=t.selectedGraphFillAlpha;c.fillColors=t.selectedGraphFillColor;c.connect=l.connect;c.hidden=l.hidden;c.width=o;c.height=n;i=t.graphType;i||(i=l.type);f.type=i;c.type=i;e=e.length-1;f.zoom(0,e);c.zoom(0,e);c.set.click(function(){t.handleBackgroundClick()}).mouseover(function(){t.handleMouseOver()}).mouseout(function(){t.handleMouseOut()});f.set.click(function(){t.handleBackgroundClick()}).mouseover(function(){t.handleMouseOver()}).mouseout(function(){t.handleMouseOut()});d.push(f.set);d.push(c.set)}d.push(s.set);d.push(s.labelsSet);t.bg.toBack();t.invisibleBg.toFront();t.dragger.toFront();t.iconLeft.toFront();t.iconRight.toFront()},timeZoom:function(t,i){this.startTime=t;this.endTime=i;this.timeDifference=i-t;this.skipEvent=!0;this.zoomScrollbar()},zoom:function(t,i){this.start=t;this.end=i;this.skipEvent=!0;this.zoomScrollbar()},dispatchScrollbarEvent:function(){if(this.skipEvent)this.skipEvent=!1;else{var t=this.chart.chartData,i,e,s=this.dragger.getBBox();i=s.x;e=s.y;var a=s.width,r=s.height,s=this.chart;this.rotate?(i=e,e=r):e=a;a={type:"zoomed",target:this};a.chart=s;var r=this.categoryAxis,h=this.stepWidth;if(r.parseDates&&!r.equalSpacing){if(t=s.firstTime,r.minDuration(),s=Math.round(i/h)+t,t=this.dragging?s+this.timeDifference:Math.round((i+e)/h)+t,s>t&&(s=t),s!=this.startTime||t!=this.endTime)this.startTime=s,this.endTime=t,a.start=s,a.end=t,a.startDate=new Date(s),a.endDate=new Date(t),this.fire(a.type,a)}else if(r.startOnAxis||(i+=h/2),e-=this.stepWidth/2,s=r.xToIndex(i),i=r.xToIndex(i+e),s!=this.start||this.end!=i)r.startOnAxis&&(this.resizingRight&&s==i&&i++,this.resizingLeft&&s==i&&(0<s?s--:i=1)),this.start=s,this.end=this.dragging?this.start+this.difference:i,a.start=this.start,a.end=this.end,r.parseDates&&(t[this.start]&&(a.startDate=new Date(t[this.start].time)),t[this.end]&&(a.endDate=new Date(t[this.end].time))),this.fire(a.type,a)}},zoomScrollbar:function(){var t,i;t=this.chart;var e=t.chartData,s=this.categoryAxis;s.parseDates&&!s.equalSpacing?(e=s.stepWidth,s=t.firstTime,t=e*(this.startTime-s),i=e*(this.endTime-s)):(t=e[this.start].x[s.id],i=e[this.end].x[s.id],e=s.stepWidth,s.startOnAxis||(s=e/2,t-=s,i+=s));this.stepWidth=e;this.updateScrollbarSize(t,i)},maskGraphs:function(t,i,e,s){var a=this.selectedGraph;a&&a.set.clipRect(t,i,e,s)},handleDragStart:function(){AmCharts.ChartScrollbar.base.handleDragStart.call(this);this.difference=this.end-this.start;this.timeDifference=this.endTime-this.startTime;0>this.timeDifference&&(this.timeDifference=0)},handleBackgroundClick:function(){AmCharts.ChartScrollbar.base.handleBackgroundClick.call(this);this.dragging||(this.difference=this.end-this.start,this.timeDifference=this.endTime-this.startTime,0>this.timeDifference&&(this.timeDifference=0))}});AmCharts.AmBalloon=AmCharts.Class({construct:function(){this.enabled=!0;this.fillColor="#FFFFFF";this.fillAlpha=.8;this.borderThickness=2;this.borderColor="#FFFFFF";this.borderAlpha=1;this.cornerRadius=0;this.maximumWidth=220;this.horizontalPadding=8;this.verticalPadding=4;this.pointerWidth=6;this.pointerOrientation="V";this.color="#000000";this.adjustBorderColor=!0;this.show=this.follow=this.showBullet=!1;this.bulletSize=3;this.shadowAlpha=.4;this.shadowColor="#000000";this.fadeOutDuration=this.animationDuration=.3;this.fixedPosition=!1;this.offsetY=5;this.offsetX=2},draw:function(){var t=this.pointToX,i=this.pointToY;this.deltaSignX=this.deltaSignY=1;var e=this.chart;AmCharts.VML&&(this.fadeOutDuration=0);this.xAnim&&e.stopAnim(this.xAnim);this.yAnim&&e.stopAnim(this.yAnim);if(!isNaN(t)){var s=this.follow,a=e.container,r=this.set;AmCharts.remove(r);this.removeDiv();this.set=r=a.set();e.balloonsSet.push(r);if(this.show){var h=this.l,o=this.t,n=this.r,l=this.b,d=this.balloonColor,u=this.fillColor,c=this.borderColor,m=u;void 0!=d&&(this.adjustBorderColor?m=c=d:u=d);var p=this.horizontalPadding,f=this.verticalPadding,g=this.pointerWidth,v=this.pointerOrientation,C=this.cornerRadius,A=e.fontFamily,b=this.fontSize;void 0==b&&(b=e.fontSize);var d=document.createElement("div"),x=d.style;x.position="absolute";d.innerHTML='<span style="font-size:'+b+"px; color:"+this.color+"; font-family:"+A+'">'+this.text+"</span>";e.chartDiv.appendChild(d);this.textDiv=d;b=d.offsetWidth;A=d.offsetHeight;d.clientHeight&&(b=d.clientWidth,A=d.clientHeight);var A=A+2*f,y=b+2*p;window.opera&&(A+=2);var w,M=!1;"H"!=v?(b=t-y/2,i<o+A+10&&"down"!=v?(M=!0,s&&(i+=this.offsetY),w=i+g,this.deltaSignY=-1):(s&&(i-=this.offsetY),w=i-A-g,this.deltaSignY=1)):(2*g>A&&(g=A/2),w=i-A/2,t<h+(n-h)/2?(b=t+g,this.deltaSignX=-1):(b=t-y-g,this.deltaSignX=1));w+A>=l&&(w=l-A);w<o&&(w=o);b<h&&(b=h);b+y>n&&(b=n-y);var o=w+f,l=b+p,f=this.shadowAlpha,N=this.shadowColor,p=this.borderThickness,S=this.bulletSize,T;0<C||0===g?(0<f&&(t=AmCharts.rect(a,y,A,u,0,p+1,N,f,this.cornerRadius),AmCharts.isModern?t.translate(1,1):t.translate(4,4),r.push(t)),u=AmCharts.rect(a,y,A,u,this.fillAlpha,p,c,this.borderAlpha,this.cornerRadius),this.showBullet&&(T=AmCharts.circle(a,S,m,this.fillAlpha),r.push(T))):(m=[],C=[],"H"!=v?(h=t-b,h>y-g&&(h=y-g),h<g&&(h=g),m=[0,h-g,t-b,h+g,y,y,0,0],C=M?[0,0,i-w,0,0,A,A,0]:[A,A,i-w,A,A,0,0,A]):(m=i-w,m>A-g&&(m=A-g),m<g&&(m=g),C=[0,m-g,i-w,m+g,A,A,0,0],m=t<h+(n-h)/2?[0,0,b<t?0:t-b,0,0,y,y,0]:[y,y,b+y>t?y:t-b,y,y,0,0,y]),0<f&&(t=AmCharts.polygon(a,m,C,u,0,p,N,f),t.translate(1,1),r.push(t)),u=AmCharts.polygon(a,m,C,u,this.fillAlpha,p,c,this.borderAlpha));this.bg=u;r.push(u);u.toFront();a=1*this.deltaSignX;x.left=l+"px";x.top=o+"px";r.translate(b-a,w);u=u.getBBox();this.bottom=w+A+1;this.yPos=u.y+w;T&&T.translate(this.pointToX-b+a,i-w);i=this.animationDuration;0<this.animationDuration&&!s&&!isNaN(this.prevX)&&(r.translate(this.prevX,this.prevY),r.animate({translate:b-a+","+w},i,"easeOutSine"),d&&(x.left=this.prevTX+"px",x.top=this.prevTY+"px",this.xAnim=e.animate({node:d},"left",this.prevTX,l,i,"easeOutSine","px"),this.yAnim=e.animate({node:d},"top",this.prevTY,o,i,"easeOutSine","px")));this.prevX=b-a;this.prevY=w;this.prevTX=l;this.prevTY=o}}},followMouse:function(){if(this.follow&&this.show){var t=this.chart.mouseX-this.offsetX*this.deltaSignX,i=this.chart.mouseY;this.pointToX=t;this.pointToY=i;if(t!=this.previousX||i!=this.previousY)if(this.previousX=t,this.previousY=i,0===this.cornerRadius)this.draw();else{var e=this.set;if(e){var s=e.getBBox(),t=t-s.width/2,a=i-s.height-10;t<this.l&&(t=this.l);t>this.r-s.width&&(t=this.r-s.width);a<this.t&&(a=i+10);e.translate(t,a);i=this.textDiv.style;i.left=t+this.horizontalPadding+"px";i.top=a+this.verticalPadding+"px"}}}},changeColor:function(t){this.balloonColor=t},setBounds:function(t,i,e,s){this.l=t;this.t=i;this.r=e;this.b=s;this.destroyTO&&clearTimeout(this.destroyTO)},showBalloon:function(t){this.text=t;this.show=!0;this.destroyTO&&clearTimeout(this.destroyTO);this.draw()},hide:function(){var t=this,i=t.fadeOutDuration,e=t.chart;if(0<i){t.destroyTO=setTimeout(function(){t.destroy.call(t)},1e3*i);t.follow=!1;t.show=!1;var s=t.set;s&&(s.setAttr("opacity",t.fillAlpha),s.animate({opacity:0},i,"easeInSine"));t.textDiv&&e.animate({node:t.textDiv},"opacity",1,0,i,"easeInSine","")}else t.show=!1,t.follow=!1,t.destroy()},setPosition:function(t,i,e){this.pointToX=t;this.pointToY=i;e&&(t==this.previousX&&i==this.previousY||this.draw());this.previousX=t;this.previousY=i},followCursor:function(t){var i=this;(i.follow=t)?(i.pShowBullet=i.showBullet,i.showBullet=!1):void 0!==i.pShowBullet&&(i.showBullet=i.pShowBullet);clearInterval(i.interval);var e=i.chart.mouseX,s=i.chart.mouseY;!isNaN(e)&&t&&(i.pointToX=e-i.offsetX*i.deltaSignX,i.pointToY=s,i.followMouse(),i.interval=setInterval(function(){i.followMouse.call(i)},40))},removeDiv:function(){if(this.textDiv){var t=this.textDiv.parentNode;t&&t.removeChild(this.textDiv)}},destroy:function(){clearInterval(this.interval);AmCharts.remove(this.set);this.removeDiv();this.set=null}});AmCharts.AmCoordinateChart=AmCharts.Class({inherits:AmCharts.AmChart,construct:function(){AmCharts.AmCoordinateChart.base.construct.call(this);this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph");this.plotAreaFillColors="#FFFFFF";this.plotAreaFillAlphas=0;this.plotAreaBorderColor="#000000";this.plotAreaBorderAlpha=0;this.startAlpha=1;this.startDuration=0;this.startEffect="elastic";this.sequencedAnimation=!0;this.colors="#FF6600 #FCD202 #B0DE09 #0D8ECF #2A0CD0 #CD0D74 #CC0000 #00CC00 #0000CC #DDDDDD #999999 #333333 #990000".split(" ");this.balloonDateFormat="MMM DD, YYYY";this.valueAxes=[];this.graphs=[]},initChart:function(){AmCharts.AmCoordinateChart.base.initChart.call(this);this.createValueAxes();AmCharts.VML&&(this.startAlpha=1);var t=this.legend;t&&t.setData(this.graphs)},createValueAxes:function(){if(0===this.valueAxes.length){var t=new AmCharts.ValueAxis;this.addValueAxis(t)}},parseData:function(){this.processValueAxes();this.processGraphs()},parseSerialData:function(){var t=this.graphs,i,e={},s=this.seriesIdField;s||(s=this.categoryField);this.chartData=[];var a=this.dataProvider;if(a){var r=!1,h,o=this.categoryAxis,n;o&&(r=o.parseDates,n=o.forceShowField,h=o.categoryFunction);var l,d;r&&(i=AmCharts.extractPeriod(o.minPeriod),l=i.period,d=i.count);var u={};this.lookupTable=u;var c,m=this.dataDateFormat;for(c=0;c<a.length;c++){var p={},f=a[c];i=f[this.categoryField];p.category=h?h(i,f,o):String(i);n&&(p.forceShow=f[n]);u[f[s]]=p;r&&(i=o.categoryFunction?o.categoryFunction(i,f,o):i instanceof Date?"fff"==o.minPeriod?AmCharts.useUTC?new Date(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate(),i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()):new Date(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()):new Date(i):m?AmCharts.stringToDate(i,m):new Date(i),i=AmCharts.resetDateToMin(i,l,d,o.firstDayOfWeek),p.category=i,p.time=i.getTime());var g=this.valueAxes;p.axes={};p.x={};var v;for(v=0;v<g.length;v++){var C=g[v].id;p.axes[C]={};p.axes[C].graphs={};var A;for(A=0;A<t.length;A++){i=t[A];var b=i.id,x=i.periodValue;if(i.valueAxis.id==C){p.axes[C].graphs[b]={};var y={};y.index=c;var w=f;i.dataProvider&&(w=e);y.values=this.processValues(w,i,x);this.processFields(i,y,w);y.category=p.category;y.serialDataItem=p;y.graph=i;p.axes[C].graphs[b]=y}}}this.chartData[c]=p}}for(e=0;e<t.length;e++)i=t[e],i.dataProvider&&this.parseGraphData(i)},processValues:function(t,i,e){var s={},a,r=!1;"candlestick"!=i.type&&"ohlc"!=i.type||""===e||(r=!0);a=Number(t[i.valueField+e]);isNaN(a)||(s.value=a);a=Number(t[i.errorField+e]);isNaN(a)||(s.error=a);r&&(e="Open");a=Number(t[i.openField+e]);isNaN(a)||(s.open=a);r&&(e="Close");a=Number(t[i.closeField+e]);isNaN(a)||(s.close=a);r&&(e="Low");a=Number(t[i.lowField+e]);isNaN(a)||(s.low=a);r&&(e="High");a=Number(t[i.highField+e]);isNaN(a)||(s.high=a);return s},parseGraphData:function(t){var i=t.dataProvider,e=t.seriesIdField;e||(e=this.seriesIdField);e||(e=this.categoryField);var s;for(s=0;s<i.length;s++){var a=i[s],r=this.lookupTable[String(a[e])],h=t.valueAxis.id;r&&(h=r.axes[h].graphs[t.id],h.serialDataItem=r,h.values=this.processValues(a,t,t.periodValue),this.processFields(t,h,a))}},addValueAxis:function(t){t.chart=this;this.valueAxes.push(t);this.validateData()},removeValueAxesAndGraphs:function(){var t=this.valueAxes,i;for(i=t.length-1;-1<i;i--)this.removeValueAxis(t[i])},removeValueAxis:function(t){var i=this.graphs,e;for(e=i.length-1;0<=e;e--){var s=i[e];s&&s.valueAxis==t&&this.removeGraph(s)}i=this.valueAxes;for(e=i.length-1;0<=e;e--)i[e]==t&&i.splice(e,1);this.validateData()},addGraph:function(t){this.graphs.push(t);this.chooseGraphColor(t,this.graphs.length-1);this.validateData()},removeGraph:function(t){var i=this.graphs,e;for(e=i.length-1;0<=e;e--)i[e]==t&&(i.splice(e,1),t.destroy());this.validateData()},processValueAxes:function(){var t=this.valueAxes,i;for(i=0;i<t.length;i++){var e=t[i];e.chart=this;e.id||(e.id="valueAxis"+i+"_"+(new Date).getTime());if(!0===this.usePrefixes||!1===this.usePrefixes)e.usePrefixes=this.usePrefixes}},processGraphs:function(){var t=this.graphs,i;for(i=0;i<t.length;i++){var e=t[i];e.chart=this;e.valueAxis||(e.valueAxis=this.valueAxes[0]);e.id||(e.id="graph"+i+"_"+(new Date).getTime())}},formatString:function(t,i){var e=i.graph,s=e.valueAxis;s.duration&&i.values.value&&(s=AmCharts.formatDuration(i.values.value,s.duration,"",s.durationUnits,s.maxInterval,s.numberFormatter),t=t.split("[[value]]").join(s));t=AmCharts.massReplace(t,{"[[title]]":e.title,"[[description]]":i.description});t=AmCharts.fixNewLines(t);return t=AmCharts.cleanFromEmpty(t)},getBalloonColor:function(t,i){var e=t.lineColor,s=t.balloonColor,a=t.fillColors;"object"==typeof a?e=a[0]:void 0!==a&&(e=a);if(i.isNegative){var a=t.negativeLineColor,r=t.negativeFillColors;"object"==typeof r?a=r[0]:void 0!==r&&(a=r);void 0!==a&&(e=a)}void 0!==i.color&&(e=i.color);void 0===s&&(s=e);return s},getGraphById:function(t){return this.getObjById(this.graphs,t)},getValueAxisById:function(t){return this.getObjById(this.valueAxes,t)},getObjById:function(t,i){var e,s;for(s=0;s<t.length;s++){var a=t[s];a.id==i&&(e=a)}return e},processFields:function(t,i,e){if(t.itemColors){var s=t.itemColors,a=i.index;i.color=a<s.length?s[a]:AmCharts.randomColor()}s="lineColor color alpha fillColors description bullet customBullet bulletSize bulletConfig url labelColor dashLength".split(" ");for(a=0;a<s.length;a++){var r=s[a],h=t[r+"Field"];h&&(h=e[h],AmCharts.isDefined(h)&&(i[r]=h))}i.dataContext=e},chooseGraphColor:function(t,i){if(!t.lineColor){var e;e=this.colors.length>i?this.colors[i]:AmCharts.randomColor();t.lineColor=e}},handleLegendEvent:function(t){var i=t.type;if(t=t.dataItem){var e=t.hidden,s=t.showBalloon;switch(i){case"clickMarker":s?this.hideGraphsBalloon(t):this.showGraphsBalloon(t);break;case"clickLabel":s?this.hideGraphsBalloon(t):this.showGraphsBalloon(t);break;case"rollOverItem":e||this.highlightGraph(t);break;case"rollOutItem":e||this.unhighlightGraph();break;case"hideItem":this.hideGraph(t);break;case"showItem":this.showGraph(t)}}},highlightGraph:function(t){var i=this.graphs,e,s=.2;this.legend&&(s=this.legend.rollOverGraphAlpha);if(1!=s)for(e=0;e<i.length;e++){var a=i[e];a!=t&&a.changeOpacity(s)}},unhighlightGraph:function(){var t;this.legend&&(t=this.legend.rollOverGraphAlpha);if(1!=t){t=this.graphs;var i;for(i=0;i<t.length;i++)t[i].changeOpacity(1)}},showGraph:function(t){t.hidden=!1;this.dataChanged=!0;this.marginsUpdated=!1;this.chartCreated&&this.initChart()},hideGraph:function(t){this.dataChanged=!0;this.marginsUpdated=!1;t.hidden=!0;this.chartCreated&&this.initChart()},hideGraphsBalloon:function(t){t.showBalloon=!1;this.updateLegend()},showGraphsBalloon:function(t){t.showBalloon=!0;this.updateLegend()},updateLegend:function(){this.legend&&this.legend.invalidateSize()},resetAnimation:function(){var t=this.graphs;if(t){var i;for(i=0;i<t.length;i++)t[i].animationPlayed=!1}},animateAgain:function(){this.resetAnimation();this.validateNow()}});AmCharts.AmSlicedChart=AmCharts.Class({inherits:AmCharts.AmChart,construct:function(){this.createEvents("rollOverSlice","rollOutSlice","clickSlice","pullOutSlice","pullInSlice","rightClickSlice");AmCharts.AmSlicedChart.base.construct.call(this);this.colors="#FF0F00 #FF6600 #FF9E01 #FCD202 #F8FF01 #B0DE09 #04D215 #0D8ECF #0D52D1 #2A0CD0 #8A0CCF #CD0D74 #754DEB #DDDDDD #999999 #333333 #000000 #57032A #CA9726 #990000 #4B0C25".split(" ");this.alpha=1;this.groupPercent=0;this.groupedTitle="Other";this.groupedPulled=!1;this.groupedAlpha=1;this.marginLeft=0;this.marginBottom=this.marginTop=10;this.marginRight=0;this.hoverAlpha=1;this.outlineColor="#FFFFFF";this.outlineAlpha=0;this.outlineThickness=1;this.startAlpha=0;this.startDuration=1;this.startEffect="bounce";this.sequencedAnimation=!0;this.pullOutDuration=1;this.pullOutEffect="bounce";this.pullOnHover=this.pullOutOnlyOne=!1;this.labelsEnabled=!0;this.labelTickColor="#000000";this.labelTickAlpha=.2;this.hideLabelsPercent=0;this.urlTarget="_self";this.autoMarginOffset=10;this.gradientRatio=[]},initChart:function(){AmCharts.AmSlicedChart.base.initChart.call(this);this.dataChanged&&(this.parseData(),this.dispatchDataUpdated=!0,this.dataChanged=!1,this.legend&&this.legend.setData(this.chartData));this.drawChart()},handleLegendEvent:function(t){var i=t.type;if(t=t.dataItem){var e=t.hidden;switch(i){case"clickMarker":e||this.clickSlice(t);break;case"clickLabel":e||this.clickSlice(t);break;case"rollOverItem":e||this.rollOverSlice(t,!1);break;case"rollOutItem":e||this.rollOutSlice(t);break;case"hideItem":this.hideSlice(t);break;case"showItem":this.showSlice(t)}}},invalidateVisibility:function(){this.recalculatePercents();this.initChart();var t=this.legend;t&&t.invalidateSize()},addEventListeners:function(t,i){var e=this;t.mouseover(function(){e.rollOverSlice(i,!0)}).mouseout(function(){e.rollOutSlice(i)}).click(function(){e.clickSlice(i)}).contextmenu(function(){e.handleRightClick(i)})},formatString:function(t,i){t=AmCharts.formatValue(t,i,["value"],this.numberFormatter,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);t=AmCharts.formatValue(t,i,["percents"],this.percentFormatter);t=AmCharts.massReplace(t,{"[[title]]":i.title,"[[description]]":i.description});-1!=t.indexOf("[[")&&(t=AmCharts.formatDataContextValue(t,i.dataContext));t=AmCharts.fixNewLines(t);return t=AmCharts.cleanFromEmpty(t)},startSlices:function(){var t;for(t=0;t<this.chartData.length;t++)0<this.startDuration&&this.sequencedAnimation?this.setStartTO(t):this.startSlice(this.chartData[t])},setStartTO:function(t){var i=this;t=setTimeout(function(){i.startSequenced.call(i)},500*(i.startDuration/i.chartData.length)*t);i.timeOuts.push(t)},pullSlices:function(t){var i=this.chartData,e;for(e=0;e<i.length;e++){var s=i[e];s.pulled&&this.pullSlice(s,1,t)}},startSequenced:function(){var t=this.chartData,i;for(i=0;i<t.length;i++)if(!t[i].started){this.startSlice(this.chartData[i]);break}},startSlice:function(t){t.started=!0;var i=t.wedge,e=this.startDuration;i&&0<e&&(0<t.alpha&&i.show(),i.translate(t.startX,t.startY),i.animate({opacity:t.alpha,translate:"0,0"},e,this.startEffect))},showLabels:function(){var t=this.chartData,i;for(i=0;i<t.length;i++){var e=t[i];if(0<e.alpha){var s=e.label;s&&s.show();(e=e.tick)&&e.show()}}},showSlice:function(t){isNaN(t)?t.hidden=!1:this.chartData[t].hidden=!1;this.invalidateVisibility()},hideSlice:function(t){isNaN(t)?t.hidden=!0:this.chartData[t].hidden=!0;this.hideBalloon();this.invalidateVisibility()},rollOverSlice:function(t,i){isNaN(t)||(t=this.chartData[t]);clearTimeout(this.hoverInt);this.pullOnHover&&this.pullSlice(t,1);1>this.hoverAlpha&&t.wedge&&t.wedge.attr({opacity:this.hoverAlpha});var e=t.balloonX,s=t.balloonY;t.pulled&&(e+=t.pullX,s+=t.pullY);var a=this.formatString(this.balloonText,t),r=AmCharts.adjustLuminosity(t.color,-.15);this.showBalloon(a,r,i,e,s);e={type:"rollOverSlice",dataItem:t,chart:this};this.fire(e.type,e)},rollOutSlice:function(t){isNaN(t)||(t=this.chartData[t]);t.wedge&&t.wedge.attr({opacity:t.alpha});this.hideBalloon();t={type:"rollOutSlice",dataItem:t,chart:this};this.fire(t.type,t)},clickSlice:function(t){isNaN(t)||(t=this.chartData[t]);t.pulled?this.pullSlice(t,0):this.pullSlice(t,1);AmCharts.getURL(t.url,this.urlTarget);t={type:"clickSlice",dataItem:t,chart:this};this.fire(t.type,t)},handleRightClick:function(t){isNaN(t)||(t=this.chartData[t]);t={type:"rightClickSlice",dataItem:t,chart:this};this.fire(t.type,t)},drawTicks:function(){var t=this.chartData,i;for(i=0;i<t.length;i++){var e=t[i];if(e.label){var s=e.ty,s=AmCharts.line(this.container,[e.tx0,e.tx,e.tx2],[e.ty0,s,s],this.labelTickColor,this.labelTickAlpha);e.tick=s;e.wedge.push(s)}}},initialStart:function(){var t=this,i=t.startDuration,e=setTimeout(function(){t.showLabels.call(t)},1e3*i);t.timeOuts.push(e);t.chartCreated?t.pullSlices(!0):(i=setTimeout(function(){t.pullSlices.call(t)},1200*i),t.timeOuts.push(i),t.startSlices())},pullSlice:function(t,i,e){var s=this.pullOutDuration;!0===e&&(s=0);(e=t.wedge)&&e.animate({translate:i*t.pullX+","+i*t.pullY},s,this.pullOutEffect);1==i?(t.pulled=!0,this.pullOutOnlyOne&&this.pullInAll(t.index),t={type:"pullOutSlice",dataItem:t,chart:this}):(t.pulled=!1,t={type:"pullInSlice",dataItem:t,chart:this});this.fire(t.type,t)},pullInAll:function(t){var i=this.chartData,e;for(e=0;e<this.chartData.length;e++)e!=t&&i[e].pulled&&this.pullSlice(i[e],0)},pullOutAll:function(t){t=this.chartData;var i;for(i=0;i<t.length;i++)t[i].pulled||this.pullSlice(t[i],1)},parseData:function(){var t=[];this.chartData=t;var i=this.dataProvider;isNaN(this.pieAlpha)||(this.alpha=this.pieAlpha);if(void 0!==i){var e=i.length,s=0,a,r,h;for(a=0;a<e;a++){r={};var o=i[a];r.dataContext=o;r.value=Number(o[this.valueField]);(h=o[this.titleField])||(h="");r.title=h;r.pulled=AmCharts.toBoolean(o[this.pulledField],!1);(h=o[this.descriptionField])||(h="");r.description=h;r.labelRadius=Number(o[this.labelRadiusField]);r.url=o[this.urlField];r.visibleInLegend=AmCharts.toBoolean(o[this.visibleInLegendField],!0);h=o[this.alphaField];r.alpha=void 0!==h?Number(h):this.alpha;h=o[this.colorField];void 0!==h&&(r.color=AmCharts.toColor(h));r.labelColor=AmCharts.toColor(o[this.labelColorField]);s+=r.value;r.hidden=!1;t[a]=r}for(a=i=0;a<e;a++)r=t[a],r.percents=100*(r.value/s),r.percents<this.groupPercent&&i++;1<i&&(this.groupValue=0,this.removeSmallSlices(),t.push({title:this.groupedTitle,value:this.groupValue,percents:100*(this.groupValue/s),pulled:this.groupedPulled,color:this.groupedColor,url:this.groupedUrl,description:this.groupedDescription,alpha:this.groupedAlpha}));e=this.baseColor;e||(e=this.pieBaseColor);s=this.brightnessStep;s||(s=this.pieBrightnessStep);for(a=0;a<t.length;a++)e?h=AmCharts.adjustLuminosity(e,a*s/100):(h=this.colors[a],void 0===h&&(h=AmCharts.randomColor())),void 0===t[a].color&&(t[a].color=h);this.recalculatePercents()}},recalculatePercents:function(){var t=this.chartData,i=0,e,s;for(e=0;e<t.length;e++)s=t[e],!s.hidden&&0<s.value&&(i+=s.value);for(e=0;e<t.length;e++)s=this.chartData[e],s.percents=!s.hidden&&0<s.value?100*s.value/i:0},removeSmallSlices:function(){var t=this.chartData,i;for(i=t.length-1;0<=i;i--)t[i].percents<this.groupPercent&&(this.groupValue+=t[i].value,t.splice(i,1))},animateAgain:function(){var t=this;t.startSlices();var i=setTimeout(function(){t.pullSlices.call(t)},1200*t.startDuration);t.timeOuts.push(i)},measureMaxLabel:function(){var t=this.chartData,i=0,e;for(e=0;e<t.length;e++){var s=this.formatString(this.labelText,t[e]),s=AmCharts.text(this.container,s,this.color,this.fontFamily,this.fontSize),a=s.getBBox().width;a>i&&(i=a);s.remove()}return i}});AmCharts.AmRectangularChart=AmCharts.Class({inherits:AmCharts.AmCoordinateChart,construct:function(){AmCharts.AmRectangularChart.base.construct.call(this);this.createEvents("zoomed");this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=20;this.verticalPosition=this.horizontalPosition=this.depth3D=this.angle=0;this.heightMultiplier=this.widthMultiplier=1;this.zoomOutText="Show all";this.zoomOutButton={backgroundColor:"#e5e5e5",backgroundAlpha:1};this.trendLines=[];this.autoMargins=!0;this.marginsUpdated=!1;this.autoMarginOffset=10},initChart:function(){AmCharts.AmRectangularChart.base.initChart.call(this);this.updateDxy();var t=!0;!this.marginsUpdated&&this.autoMargins&&(this.resetMargins(),t=!1);this.updateMargins();this.updatePlotArea();this.updateScrollbars();this.updateTrendLines();this.updateChartCursor();this.updateValueAxes();t&&(this.scrollbarOnly||this.updateGraphs())},drawChart:function(){AmCharts.AmRectangularChart.base.drawChart.call(this);this.drawPlotArea();if(AmCharts.ifArray(this.chartData)){var t=this.chartCursor;t&&t.draw();t=this.zoomOutText;""!==t&&t&&this.drawZoomOutButton()}},resetMargins:function(){var t={},i;if("serial"==this.chartType||"gantt"==this.chartType){var e=this.valueAxes;for(i=0;i<e.length;i++){var s=e[i];s.ignoreAxisWidth||(s.setOrientation(this.rotate),s.fixAxisPosition(),t[s.position]=!0)}(i=this.categoryAxis)&&!i.ignoreAxisWidth&&(i.setOrientation(!this.rotate),i.fixAxisPosition(),i.fixAxisPosition(),t[i.position]=!0)}else{s=this.xAxes;e=this.yAxes;for(i=0;i<s.length;i++){var a=s[i];a.ignoreAxisWidth||(a.setOrientation(!0),a.fixAxisPosition(),t[a.position]=!0)}for(i=0;i<e.length;i++)s=e[i],s.ignoreAxisWidth||(s.setOrientation(!1),s.fixAxisPosition(),t[s.position]=!0)}t.left&&(this.marginLeft=0);t.right&&(this.marginRight=0);t.top&&(this.marginTop=0);t.bottom&&(this.marginBottom=0);this.fixMargins=t},measureMargins:function(){var t=this.valueAxes,i,e=this.autoMarginOffset,s=this.fixMargins,a=this.realWidth,r=this.realHeight,h=e,o=e,n=a-e;i=r-e;var l;for(l=0;l<t.length;l++)i=this.getAxisBounds(t[l],h,n,o,i),h=i.l,n=i.r,o=i.t,i=i.b;if(t=this.categoryAxis)i=this.getAxisBounds(t,h,n,o,i),h=i.l,n=i.r,o=i.t,i=i.b;s.left&&h<e&&(this.marginLeft=Math.round(-h+e));s.right&&n>a-e&&(this.marginRight=Math.round(n-a+e));s.top&&o<e+this.titleHeight&&(this.marginTop=Math.round(this.marginTop-o+e+this.titleHeight));s.bottom&&i>r-e&&(this.marginBottom=Math.round(i-r+e));this.initChart()},getAxisBounds:function(t,i,e,s,a){if(!t.ignoreAxisWidth){var r=t.labelsSet,h=t.tickLength;t.inside&&(h=0);if(r)switch(r=t.getBBox(),t.position){case"top":t=r.y;s>t&&(s=t);break;case"bottom":t=r.y+r.height;a<t&&(a=t);break;case"right":t=r.x+r.width+h+3;e<t&&(e=t);break;case"left":t=r.x-h,i>t&&(i=t)}}return{l:i,t:s,r:e,b:a}},drawZoomOutButton:function(){var t=this,i=t.container.set();t.zoomButtonSet.push(i);var e=t.color,s=t.fontSize,a=t.zoomOutButton;a&&(a.fontSize&&(s=a.fontSize),a.color&&(e=a.color));e=AmCharts.text(t.container,t.zoomOutText,e,t.fontFamily,s,"start");s=e.getBBox();e.translate(26,6+s.height/2);var r=a.backgroundColor,a=a.backgroundAlpha,a=AmCharts.rect(t.container,s.width+35,s.height+15,r,a,1,r,a);i.push(a);t.zbBG=a;void 0!==t.pathToImages&&(a=t.container.image(t.pathToImages+"lens.png",0,0,17,17),a.translate(6,s.height/2-1),a.toFront(),i.push(a));e.toFront();i.push(e);e=i.getBBox();i.translate(t.marginLeftReal+t.plotAreaWidth-e.width,t.marginTopReal);i.hide();i.mouseover(function(){t.rollOverZB()}).mouseout(function(){t.rollOutZB()}).click(function(){t.clickZB()}).touchstart(function(){t.rollOverZB()}).touchend(function(){t.rollOutZB();t.clickZB()});for(e=0;e<i.length;e++)i[e].attr({cursor:"pointer"});t.zbSet=i},rollOverZB:function(){this.zbBG.show()},rollOutZB:function(){this.zbBG.hide()},clickZB:function(){this.zoomOut()},zoomOut:function(){this.updateScrollbar=!0;this.zoom()},drawPlotArea:function(){var t=this.dx,i=this.dy,e=this.marginLeftReal,s=this.marginTopReal,a=this.plotAreaWidth-1,r=this.plotAreaHeight-1,h=this.plotAreaFillColors,o=this.plotAreaFillAlphas,n=this.plotAreaBorderColor,l=this.plotAreaBorderAlpha;this.trendLinesSet.clipRect(e,s,a,r);"object"==typeof o&&(o=o[0]);h=AmCharts.polygon(this.container,[0,a,a,0],[0,0,r,r],h,o,1,n,l,this.plotAreaGradientAngle);h.translate(e+t,s+i);h.node.setAttribute("class","amChartsPlotArea");this.set.push(h);0!==t&&0!==i&&(h=this.plotAreaFillColors,"object"==typeof h&&(h=h[0]),h=AmCharts.adjustLuminosity(h,-.15),a=AmCharts.polygon(this.container,[0,t,a+t,a,0],[0,i,i,0,0],h,o,1,n,l),a.translate(e,s+r),this.set.push(a),t=AmCharts.polygon(this.container,[0,0,t,t,0],[0,r,r+i,i,0],h,o,1,n,l),t.translate(e,s),this.set.push(t))},updatePlotArea:function(){var t=this.updateWidth(),i=this.updateHeight(),e=this.container;this.realWidth=t;this.realWidth=i;e&&this.container.setSize(t,i);t=t-this.marginLeftReal-this.marginRightReal-this.dx;i=i-this.marginTopReal-this.marginBottomReal;1>t&&(t=1);1>i&&(i=1);this.plotAreaWidth=Math.round(t);this.plotAreaHeight=Math.round(i)},updateDxy:function(){this.dx=Math.round(this.depth3D*Math.cos(this.angle*Math.PI/180));this.dy=Math.round(-this.depth3D*Math.sin(this.angle*Math.PI/180));this.d3x=Math.round(this.columnSpacing3D*Math.cos(this.angle*Math.PI/180));this.d3y=Math.round(-this.columnSpacing3D*Math.sin(this.angle*Math.PI/180))},updateMargins:function(){var t=this.getTitleHeight();this.titleHeight=t;this.marginTopReal=this.marginTop-this.dy+t;this.marginBottomReal=this.marginBottom;this.marginLeftReal=this.marginLeft;this.marginRightReal=this.marginRight},updateValueAxes:function(){var t=this.valueAxes,i=this.marginLeftReal,e=this.marginTopReal,s=this.plotAreaHeight,a=this.plotAreaWidth,r;for(r=0;r<t.length;r++){var h=t[r];h.axisRenderer=AmCharts.RecAxis;h.guideFillRenderer=AmCharts.RecFill;h.axisItemRenderer=AmCharts.RecItem;h.dx=this.dx;h.dy=this.dy;h.viW=a-1;h.viH=s-1;h.marginsChanged=!0;h.viX=i;h.viY=e;this.updateObjectSize(h)}},updateObjectSize:function(t){t.width=(this.plotAreaWidth-1)*this.widthMultiplier;t.height=(this.plotAreaHeight-1)*this.heightMultiplier;t.x=this.marginLeftReal+this.horizontalPosition;t.y=this.marginTopReal+this.verticalPosition},updateGraphs:function(){var t=this.graphs,i;for(i=0;i<t.length;i++){var e=t[i];e.x=this.marginLeftReal+this.horizontalPosition;e.y=this.marginTopReal+this.verticalPosition;e.width=this.plotAreaWidth*this.widthMultiplier;e.height=this.plotAreaHeight*this.heightMultiplier;e.index=i;e.dx=this.dx;e.dy=this.dy;e.rotate=this.rotate;e.chartType=this.chartType}},updateChartCursor:function(){var t=this.chartCursor;t&&(t.x=this.marginLeftReal,t.y=this.marginTopReal,t.width=this.plotAreaWidth-1,t.height=this.plotAreaHeight-1,t.chart=this)},updateScrollbars:function(){},addChartCursor:function(t){AmCharts.callMethod("destroy",[this.chartCursor]);t&&(this.listenTo(t,"changed",this.handleCursorChange),this.listenTo(t,"zoomed",this.handleCursorZoom));this.chartCursor=t},removeChartCursor:function(){AmCharts.callMethod("destroy",[this.chartCursor]);this.chartCursor=null},zoomTrendLines:function(){var t=this.trendLines,i;for(i=0;i<t.length;i++){var e=t[i];e.valueAxis.recalculateToPercents?e.set&&e.set.hide():(e.x=this.marginLeftReal+this.horizontalPosition,e.y=this.marginTopReal+this.verticalPosition,e.draw())}},addTrendLine:function(t){this.trendLines.push(t)},removeTrendLine:function(t){var i=this.trendLines,e;for(e=i.length-1;0<=e;e--)i[e]==t&&i.splice(e,1)},adjustMargins:function(t,i){var e=t.scrollbarHeight;"top"==t.position?i?this.marginLeftReal+=e:this.marginTopReal+=e:i?this.marginRightReal+=e:this.marginBottomReal+=e},getScrollbarPosition:function(t,i,e){t.position=i?"bottom"==e||"left"==e?"bottom":"top":"top"==e||"right"==e?"bottom":"top"},updateChartScrollbar:function(t,i){if(t){t.rotate=i;var e=this.marginTopReal,s=this.marginLeftReal,a=t.scrollbarHeight,r=this.dx,h=this.dy;"top"==t.position?i?(t.y=e,t.x=s-a):(t.y=e-a+h-1,t.x=s+r):i?(t.y=e+h,t.x=s+this.plotAreaWidth+r):(t.y=e+this.plotAreaHeight,
t.x=this.marginLeftReal)}},showZB:function(t){var i=this.zbSet;i&&(t?i.show():i.hide(),this.zbBG.hide())},handleReleaseOutside:function(t){AmCharts.AmRectangularChart.base.handleReleaseOutside.call(this,t);(t=this.chartCursor)&&t.handleReleaseOutside()},handleMouseDown:function(t){AmCharts.AmRectangularChart.base.handleMouseDown.call(this,t);var i=this.chartCursor;i&&i.handleMouseDown(t)},handleCursorChange:function(t){}});AmCharts.TrendLine=AmCharts.Class({construct:function(){this.createEvents("click");this.isProtected=!1;this.dashLength=0;this.lineColor="#00CC00";this.lineThickness=this.lineAlpha=1},draw:function(){var t=this;t.destroy();var i=t.chart,e=i.container,s,a,r,h,o=t.categoryAxis,n=t.initialDate,l=t.initialCategory,d=t.finalDate,u=t.finalCategory,c=t.valueAxis,m=t.valueAxisX,p=t.initialXValue,f=t.finalXValue,g=t.initialValue,v=t.finalValue,C=c.recalculateToPercents,A=i.dataDateFormat;o&&(n&&(n instanceof Date||(n=A?AmCharts.stringToDate(n,A):new Date(n)),t.initialDate=n,s=o.dateToCoordinate(n)),l&&(s=o.categoryToCoordinate(l)),d&&(d instanceof Date||(d=A?AmCharts.stringToDate(d,A):new Date(d)),t.finalDate=d,a=o.dateToCoordinate(d)),u&&(a=o.categoryToCoordinate(u)));m&&!C&&(isNaN(p)||(s=m.getCoordinate(p)),isNaN(f)||(a=m.getCoordinate(f)));c&&!C&&(isNaN(g)||(r=c.getCoordinate(g)),isNaN(v)||(h=c.getCoordinate(v)));isNaN(s)||isNaN(a)||isNaN(r)||isNaN(r)||(i.rotate?(o=[r,h],a=[s,a]):(o=[s,a],a=[r,h]),r=t.lineColor,s=AmCharts.line(e,o,a,r,t.lineAlpha,t.lineThickness,t.dashLength),a=AmCharts.line(e,o,a,r,.005,5),e=e.set([s,a]),e.translate(i.marginLeftReal,i.marginTopReal),i.trendLinesSet.push(e),t.line=s,t.set=e,a.mouseup(function(){t.handleLineClick()}).mouseover(function(){t.handleLineOver()}).mouseout(function(){t.handleLineOut()}),a.touchend&&a.touchend(function(){t.handleLineClick()}))},handleLineClick:function(){var t={type:"click",trendLine:this,chart:this.chart};this.fire(t.type,t)},handleLineOver:function(){var t=this.rollOverColor;void 0!==t&&this.line.attr({stroke:t})},handleLineOut:function(){this.line.attr({stroke:this.lineColor})},destroy:function(){AmCharts.remove(this.set)}});AmCharts.circle=function(t,i,e,s,a,r,h,o){if(void 0==a||0===a)a=1;void 0===r&&(r="#000000");void 0===h&&(h=0);s={fill:e,stroke:r,"fill-opacity":s,"stroke-width":a,"stroke-opacity":h};t=t.circle(0,0,i).attr(s);o&&t.gradient("radialGradient",[e,AmCharts.adjustLuminosity(e,-.6)]);return t};AmCharts.text=function(t,i,e,s,a,r,h,o){r||(r="middle");"right"==r&&(r="end");void 0!==i&&(i=String(i),AmCharts.isIE&&!AmCharts.isModern&&(i=i.replace("&amp;","&"),i=i.replace("&","&amp;")));e={fill:e,"font-family":s,"font-size":a,opacity:o};!0===h&&(e["font-weight"]="bold");e["text-anchor"]=r;return t.text(i,e)};AmCharts.polygon=function(t,i,e,s,a,r,h,o,n,l,d){isNaN(r)&&(r=0);isNaN(o)&&(o=a);var u=s,c=!1;"object"==typeof u&&1<u.length&&(c=!0,u=u[0]);void 0===h&&(h=u);a={fill:u,stroke:h,"fill-opacity":a,"stroke-width":r,"stroke-opacity":o};void 0!==d&&0<d&&(a["stroke-dasharray"]=d);d=AmCharts.dx;r=AmCharts.dy;h=Math.round;l&&(h=AmCharts.doNothing);l="M"+(h(i[0])+d)+","+(h(e[0])+r);for(o=1;o<i.length;o++)l+=" L"+(h(i[o])+d)+","+(h(e[o])+r);t=t.path(l+" Z").attr(a);c&&t.gradient("linearGradient",s,n);return t};AmCharts.rect=function(t,i,e,s,a,r,h,o,n,l,d){isNaN(r)&&(r=0);void 0===n&&(n=0);void 0===l&&(l=270);isNaN(a)&&(a=0);var u=s,c=!1;"object"==typeof u&&(u=u[0],c=!0);void 0===h&&(h=u);void 0===o&&(o=a);i=Math.round(i);e=Math.round(e);var m=0,p=0;0>i&&(i=Math.abs(i),m=-i);0>e&&(e=Math.abs(e),p=-e);m+=AmCharts.dx;p+=AmCharts.dy;a={fill:u,stroke:h,"fill-opacity":a,"stroke-opacity":o};void 0!==d&&0<d&&(a["stroke-dasharray"]=d);t=t.rect(m,p,i,e,n,r).attr(a);c&&t.gradient("linearGradient",s,l);return t};AmCharts.bullet=function(t,i,e,s,a,r,h,o,n,l){var d;"circle"==i&&(i="round");switch(i){case"round":d=AmCharts.circle(t,e/2,s,a,r,h,o);break;case"square":d=AmCharts.polygon(t,[-e/2,e/2,e/2,-e/2],[e/2,e/2,-e/2,-e/2],s,a,r,h,o,l-180);break;case"diamond":d=AmCharts.polygon(t,[-e/2,0,e/2,0],[0,-e/2,0,e/2],s,a,r,h,o);break;case"triangleUp":d=AmCharts.triangle(t,e,0,s,a,r,h,o);break;case"triangleDown":d=AmCharts.triangle(t,e,180,s,a,r,h,o);break;case"triangleLeft":d=AmCharts.triangle(t,e,270,s,a,r,h,o);break;case"triangleRight":d=AmCharts.triangle(t,e,90,s,a,r,h,o);break;case"bubble":d=AmCharts.circle(t,e/2,s,a,r,h,o,!0);break;case"yError":d=t.set();d.push(AmCharts.line(t,[0,0],[-e/2,e/2],s,a,r));d.push(AmCharts.line(t,[-n,n],[-e/2,-e/2],s,a,r));d.push(AmCharts.line(t,[-n,n],[e/2,e/2],s,a,r));break;case"xError":d=t.set(),d.push(AmCharts.line(t,[-e/2,e/2],[0,0],s,a,r)),d.push(AmCharts.line(t,[-e/2,-e/2],[-n,n],s,a,r)),d.push(AmCharts.line(t,[e/2,e/2],[-n,n],s,a,r))}return d};AmCharts.triangle=function(t,i,e,s,a,r,h,o){if(void 0===r||0===r)r=1;void 0===h&&(h="#000");void 0===o&&(o=0);s={fill:s,stroke:h,"fill-opacity":a,"stroke-width":r,"stroke-opacity":o};i/=2;var n;0===e&&(n=" M"+-i+","+i+" L0,"+-i+" L"+i+","+i+" Z");180==e&&(n=" M"+-i+","+-i+" L0,"+i+" L"+i+","+-i+" Z");90==e&&(n=" M"+-i+","+-i+" L"+i+",0 L"+-i+","+i+" Z");270==e&&(n=" M"+-i+",0 L"+i+","+i+" L"+i+","+-i+" Z");return t.path(n).attr(s)};AmCharts.line=function(t,i,e,s,a,r,h,o,n,l){r={fill:"none","stroke-width":r};void 0!==h&&0<h&&(r["stroke-dasharray"]=h);isNaN(a)||(r["stroke-opacity"]=a);s&&(r.stroke=s);s=Math.round;l&&(s=AmCharts.doNothing);l=AmCharts.dx;a=AmCharts.dy;h="M"+(s(i[0])+l)+","+(s(e[0])+a);for(o=1;o<i.length;o++)h+=" L"+(s(i[o])+l)+","+(s(e[o])+a);if(AmCharts.VML)return t.path(h,void 0,!0).attr(r);n&&(h+=" M0,0 L0,0");return t.path(h).attr(r)};AmCharts.doNothing=function(t){return t};AmCharts.wedge=function(t,i,e,s,a,r,h,o,n,l,d){var u=Math.round;r=u(r);h=u(h);o=u(o);var c=u(h/r*o),m=AmCharts.VML,p=359.5+r/100;359.94<p&&(p=359.94);a>=p&&(a=p);var f=1/180*Math.PI,p=i+Math.sin(s*f)*o,g=e-Math.cos(s*f)*c,v=i+Math.sin(s*f)*r,C=e-Math.cos(s*f)*h,A=i+Math.sin((s+a)*f)*r,b=e-Math.cos((s+a)*f)*h,x=i+Math.sin((s+a)*f)*o,f=e-Math.cos((s+a)*f)*c,y={fill:AmCharts.adjustLuminosity(l.fill,-.2),"stroke-opacity":0},w=0;180<Math.abs(a)&&(w=1);s=t.set();var M;m&&(p=u(10*p),v=u(10*v),A=u(10*A),x=u(10*x),g=u(10*g),C=u(10*C),b=u(10*b),f=u(10*f),i=u(10*i),n=u(10*n),e=u(10*e),r*=10,h*=10,o*=10,c*=10,1>Math.abs(a)&&1>=Math.abs(A-v)&&1>=Math.abs(b-C)&&(M=!0));a="";if(0<n){m?(path=" M"+p+","+(g+n)+" L"+v+","+(C+n),M||(path+=" A"+(i-r)+","+(n+e-h)+","+(i+r)+","+(n+e+h)+","+v+","+(C+n)+","+A+","+(b+n)),path+=" L"+x+","+(f+n),0<o&&(M||(path+=" B"+(i-o)+","+(n+e-c)+","+(i+o)+","+(n+e+c)+","+x+","+(n+f)+","+p+","+(n+g)))):(path=" M"+p+","+(g+n)+" L"+v+","+(C+n),path+=" A"+r+","+h+",0,"+w+",1,"+A+","+(b+n)+" L"+x+","+(f+n),0<o&&(path+=" A"+o+","+c+",0,"+w+",0,"+p+","+(g+n)));path+=" Z";var N=t.path(path,void 0,void 0,"1000,1000").attr(y);s.push(N);N=t.path(" M"+p+","+g+" L"+p+","+(g+n)+" L"+v+","+(C+n)+" L"+v+","+C+" L"+p+","+g+" Z",void 0,void 0,"1000,1000").attr(y);n=t.path(" M"+A+","+b+" L"+A+","+(b+n)+" L"+x+","+(f+n)+" L"+x+","+f+" L"+A+","+b+" Z",void 0,void 0,"1000,1000").attr(y);s.push(N);s.push(n)}m?(M||(a=" A"+u(i-r)+","+u(e-h)+","+u(i+r)+","+u(e+h)+","+u(v)+","+u(C)+","+u(A)+","+u(b)),r=" M"+u(p)+","+u(g)+" L"+u(v)+","+u(C)+a+" L"+u(x)+","+u(f)):r=" M"+p+","+g+" L"+v+","+C+(" A"+r+","+h+",0,"+w+",1,"+A+","+b)+" L"+x+","+f;0<o&&(m?M||(r+=" B"+(i-o)+","+(e-c)+","+(i+o)+","+(e+c)+","+x+","+f+","+p+","+g):r+=" A"+o+","+c+",0,"+w+",0,"+p+","+g);t=t.path(r+" Z",void 0,void 0,"1000,1000").attr(l);if(d){i=[];for(e=0;e<d.length;e++)i.push(AmCharts.adjustLuminosity(l.fill,d[e]));0<i.length&&t.gradient("linearGradient",i)}s.push(t);return s};AmCharts.adjustLuminosity=function(t,i){t=String(t).replace(/[^0-9a-f]/gi,"");6>t.length&&(t=String(t[0])+String(t[0])+String(t[1])+String(t[1])+String(t[2])+String(t[2]));i=i||0;var e="#",s,a;for(a=0;3>a;a++)s=parseInt(t.substr(2*a,2),16),s=Math.round(Math.min(Math.max(0,s+s*i),255)).toString(16),e+=("00"+s).substr(s.length);return e};AmCharts.Bezier=AmCharts.Class({construct:function(t,i,e,s,a,r,h,o,n,l){"object"==typeof h&&(h=h[0]);"object"==typeof o&&(o=o[0]);r={fill:h,"fill-opacity":o,"stroke-width":r};void 0!==n&&0<n&&(r["stroke-dasharray"]=n);isNaN(a)||(r["stroke-opacity"]=a);s&&(r.stroke=s);s="M"+Math.round(i[0])+","+Math.round(e[0]);a=[];for(n=0;n<i.length;n++)a.push({x:Number(i[n]),y:Number(e[n])});1<a.length&&(i=this.interpolate(a),s+=this.drawBeziers(i));l?s+=l:AmCharts.VML||(s+="M0,0 L0,0");this.path=t.path(s).attr(r)},interpolate:function(t){var i=[];i.push({x:t[0].x,y:t[0].y});var e=t[1].x-t[0].x,s=t[1].y-t[0].y,a=AmCharts.bezierX,r=AmCharts.bezierY;i.push({x:t[0].x+e/a,y:t[0].y+s/r});var h;for(h=1;h<t.length-1;h++){var o=t[h-1],n=t[h],s=t[h+1],e=s.x-n.x,s=s.y-o.y,o=n.x-o.x;o>e&&(o=e);i.push({x:n.x-o/a,y:n.y-s/r});i.push({x:n.x,y:n.y});i.push({x:n.x+o/a,y:n.y+s/r})}s=t[t.length-1].y-t[t.length-2].y;e=t[t.length-1].x-t[t.length-2].x;i.push({x:t[t.length-1].x-e/a,y:t[t.length-1].y-s/r});i.push({x:t[t.length-1].x,y:t[t.length-1].y});return i},drawBeziers:function(t){var i="",e;for(e=0;e<(t.length-1)/3;e++)i+=this.drawBezierMidpoint(t[3*e],t[3*e+1],t[3*e+2],t[3*e+3]);return i},drawBezierMidpoint:function(t,i,e,s){var a=Math.round,r=this.getPointOnSegment(t,i,.75),h=this.getPointOnSegment(s,e,.75),o=(s.x-t.x)/16,n=(s.y-t.y)/16,l=this.getPointOnSegment(t,i,.375);t=this.getPointOnSegment(r,h,.375);t.x-=o;t.y-=n;i=this.getPointOnSegment(h,r,.375);i.x+=o;i.y+=n;e=this.getPointOnSegment(s,e,.375);o=this.getMiddle(l,t);r=this.getMiddle(r,h);h=this.getMiddle(i,e);l=" Q"+a(l.x)+","+a(l.y)+","+a(o.x)+","+a(o.y);l+=" Q"+a(t.x)+","+a(t.y)+","+a(r.x)+","+a(r.y);l+=" Q"+a(i.x)+","+a(i.y)+","+a(h.x)+","+a(h.y);return l+=" Q"+a(e.x)+","+a(e.y)+","+a(s.x)+","+a(s.y)},getMiddle:function(t,i){return{x:(t.x+i.x)/2,y:(t.y+i.y)/2}},getPointOnSegment:function(t,i,e){return{x:t.x+(i.x-t.x)*e,y:t.y+(i.y-t.y)*e}}});AmCharts.AmDraw=AmCharts.Class({construct:function(t,i,e,s){AmCharts.SVG_NS="http://www.w3.org/2000/svg";AmCharts.SVG_XLINK="http://www.w3.org/1999/xlink";AmCharts.hasSVG=!!document.createElementNS&&!!document.createElementNS(AmCharts.SVG_NS,"svg").createSVGRect;1>i&&(i=10);1>e&&(e=10);this.div=t;this.width=i;this.height=e;this.rBin=document.createElement("div");AmCharts.hasSVG?(AmCharts.SVG=!0,s=this.createSvgElement("svg"),s.style.position="absolute",s.style.width=i+"px",s.style.height=e+"px",AmCharts.rtl&&(s.setAttribute("direction","rtl"),s.style.left="auto",s.style.right="0px"),s.setAttribute("version","1.1"),t.appendChild(s),this.container=s,this.R=new AmCharts.SVGRenderer(this)):AmCharts.isIE&&AmCharts.VMLRenderer&&(AmCharts.VML=!0,AmCharts.vmlStyleSheet||(document.namespaces.add("amvml","urn:schemas-microsoft-com:vml"),i=document.createStyleSheet(),i.addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true"),AmCharts.vmlStyleSheet=i),this.container=t,this.R=new AmCharts.VMLRenderer(this,s),this.R.disableSelection(t))},createSvgElement:function(t){return document.createElementNS(AmCharts.SVG_NS,t)},circle:function(t,i,e,s){var a=new AmCharts.AmDObject("circle",this);a.attr({r:e,cx:t,cy:i});this.addToContainer(a.node,s);return a},setSize:function(t,i){0<t&&0<i&&(this.container.style.width=t+"px",this.container.style.height=i+"px")},rect:function(t,i,e,s,a,r,h){var o=new AmCharts.AmDObject("rect",this);AmCharts.VML&&(a=100*a/Math.min(e,s),e+=2*r,s+=2*r,o.bw=r,o.node.style.marginLeft=-r,o.node.style.marginTop=-r);1>e&&(e=1);1>s&&(s=1);o.attr({x:t,y:i,width:e,height:s,rx:a,ry:a,"stroke-width":r});this.addToContainer(o.node,h);return o},image:function(t,i,e,s,a,r){var h=new AmCharts.AmDObject("image",this);h.attr({x:i,y:e,width:s,height:a});this.R.path(h,t);this.addToContainer(h.node,r);return h},addToContainer:function(t,i){i||(i=this.container);i.appendChild(t)},text:function(t,i,e){return this.R.text(t,i,e)},path:function(t,i,e,s){var a=new AmCharts.AmDObject("path",this);s||(s="100,100");a.attr({cs:s});e?a.attr({dd:t}):a.attr({d:t});this.addToContainer(a.node,i);return a},set:function(t){return this.R.set(t)},remove:function(t){if(t){var i=this.rBin;i.appendChild(t);i.innerHTML=""}},renderFix:function(){var t=this.container,i=t.style,e;try{e=t.getScreenCTM()||t.createSVGMatrix()}catch(s){e=t.createSVGMatrix()}t=1-e.e%1;e=1-e.f%1;.5<t&&(t-=1);.5<e&&(e-=1);t&&(i.left=t+"px");e&&(i.top=e+"px")},update:function(){this.R.update()}});AmCharts.AmDObject=AmCharts.Class({construct:function(t,i){this.D=i;this.R=i.R;this.node=this.R.create(this,t);this.y=this.x=0;this.scale=1},attr:function(t){this.R.attr(this,t);return this},getAttr:function(t){return this.node.getAttribute(t)},setAttr:function(t,i){this.R.setAttr(this,t,i);return this},clipRect:function(t,i,e,s){this.R.clipRect(this,t,i,e,s)},translate:function(t,i,e,s){s||(t=Math.round(t),i=Math.round(i));this.R.move(this,t,i,e);this.x=t;this.y=i;this.scale=e;this.angle&&this.rotate(this.angle)},rotate:function(t){this.R.rotate(this,t);this.angle=t},animate:function(t,i,e){for(var s in t)if(t.hasOwnProperty(s)){var a=s,r=t[s];e=AmCharts.getEffect(e);this.R.animate(this,a,r,i,e)}},push:function(t){if(t){var i=this.node;i.appendChild(t.node);var e=t.clipPath;e&&i.appendChild(e);(t=t.grad)&&i.appendChild(t)}},text:function(t){this.R.setText(this,t)},remove:function(){this.R.remove(this)},clear:function(){var t=this.node;if(t.hasChildNodes())for(;1<=t.childNodes.length;)t.removeChild(t.firstChild)},hide:function(){this.setAttr("visibility","hidden")},show:function(){this.setAttr("visibility","visible")},getBBox:function(){return this.R.getBBox(this)},toFront:function(){var t=this.node;if(t){this.prevNextNode=t.nextSibling;var i=t.parentNode;i&&i.appendChild(t)}},toPrevious:function(){var t=this.node;t&&this.prevNextNode&&(t=t.parentNode)&&t.insertBefore(this.prevNextNode,null)},toBack:function(){var t=this.node;if(t){this.prevNextNode=t.nextSibling;var i=t.parentNode;if(i){var e=i.firstChild;e&&i.insertBefore(t,e)}}},mouseover:function(t){this.R.addListener(this,"mouseover",t);return this},mouseout:function(t){this.R.addListener(this,"mouseout",t);return this},click:function(t){this.R.addListener(this,"click",t);return this},dblclick:function(t){this.R.addListener(this,"dblclick",t);return this},mousedown:function(t){this.R.addListener(this,"mousedown",t);return this},mouseup:function(t){this.R.addListener(this,"mouseup",t);return this},touchstart:function(t){this.R.addListener(this,"touchstart",t);return this},touchend:function(t){this.R.addListener(this,"touchend",t);return this},contextmenu:function(t){this.node.addEventListener?this.node.addEventListener("contextmenu",t,!0):this.R.addListener(this,"contextmenu",t);return this},stop:function(t){(t=this.animationX)&&AmCharts.removeFromArray(this.R.animations,t);(t=this.animationY)&&AmCharts.removeFromArray(this.R.animations,t)},length:function(){return this.node.childNodes.length},gradient:function(t,i,e){this.R.gradient(this,t,i,e)}});AmCharts.VMLRenderer=AmCharts.Class({construct:function(t,i){this.chart=i;this.D=t;this.cNames={circle:"oval",rect:"roundrect",path:"shape"};this.styleMap={x:"left",y:"top",width:"width",height:"height","font-family":"fontFamily","font-size":"fontSize",visibility:"visibility"}},create:function(t,i){var e;if("group"==i)e=document.createElement("div"),t.type="div";else if("text"==i)e=document.createElement("div"),t.type="text";else if("image"==i)e=document.createElement("img"),t.type="image";else{t.type="shape";t.shapeType=this.cNames[i];e=document.createElement("amvml:"+this.cNames[i]);var s=document.createElement("amvml:stroke");e.appendChild(s);t.stroke=s;var a=document.createElement("amvml:fill");e.appendChild(a);t.fill=a;a.className="amvml";s.className="amvml";e.className="amvml"}e.style.position="absolute";e.style.top=0;e.style.left=0;return e},path:function(t,i){t.node.setAttribute("src",i)},setAttr:function(t,i,e){if(void 0!==e){var s;8===document.documentMode&&(s=!0);var a=t.node,r=t.type,h=a.style;"r"==i&&(h.width=2*e,h.height=2*e);"roundrect"!=t.shapeType||"width"!=i&&"height"!=i||(e-=1);"cursor"==i&&(h.cursor=e);"cx"==i&&(h.left=e-AmCharts.removePx(h.width)/2);"cy"==i&&(h.top=e-AmCharts.removePx(h.height)/2);var o=this.styleMap[i];void 0!==o&&(h[o]=e);"text"==r&&("text-anchor"==i&&(t.anchor=e,o=a.clientWidth,"end"==e&&(h.marginLeft=-o+"px"),"middle"==e&&(h.marginLeft=-(o/2)+"px",h.textAlign="center"),"start"==e&&(h.marginLeft="0px")),"fill"==i&&(h.color=e),"font-weight"==i&&(h.fontWeight=e));if(h=t.children)for(o=0;o<h.length;o++)h[o].setAttr(i,e);if("shape"==r){"cs"==i&&(a.style.width="100px",a.style.height="100px",a.setAttribute("coordsize",e));"d"==i&&a.setAttribute("path",this.svgPathToVml(e));"dd"==i&&a.setAttribute("path",e);r=t.stroke;t=t.fill;"stroke"==i&&(s?r.color=e:r.setAttribute("color",e));"stroke-width"==i&&(s?r.weight=e:r.setAttribute("weight",e));"stroke-opacity"==i&&(s?r.opacity=e:r.setAttribute("opacity",e));"stroke-dasharray"==i&&(h="solid",0<e&&3>e&&(h="dot"),3<=e&&6>=e&&(h="dash"),6<e&&(h="longdash"),s?r.dashstyle=h:r.setAttribute("dashstyle",h));if("fill-opacity"==i||"opacity"==i)0===e?s?t.on=!1:t.setAttribute("on",!1):s?t.opacity=e:t.setAttribute("opacity",e);"fill"==i&&(s?t.color=e:t.setAttribute("color",e));"rx"==i&&(s?a.arcSize=e+"%":a.setAttribute("arcsize",e+"%"))}}},attr:function(t,i){for(var e in i)i.hasOwnProperty(e)&&this.setAttr(t,e,i[e])},text:function(t,i,e){var s=new AmCharts.AmDObject("text",this.D),a=s.node;a.style.whiteSpace="pre";a.innerHTML=t;this.D.addToContainer(a,e);this.attr(s,i);return s},getBBox:function(t){return this.getBox(t.node)},getBox:function(t){var i=t.offsetLeft,e=t.offsetTop,s=t.offsetWidth,a=t.offsetHeight,r;if(t.hasChildNodes()){var h,o,n;for(n=0;n<t.childNodes.length;n++){r=this.getBox(t.childNodes[n]);var l=r.x;isNaN(l)||(isNaN(h)?h=l:l<h&&(h=l));var d=r.y;isNaN(d)||(isNaN(o)?o=d:d<o&&(o=d));l=r.width+l;isNaN(l)||(s=Math.max(s,l));r=r.height+d;isNaN(r)||(a=Math.max(a,r))}0>h&&(i+=h);0>o&&(e+=o)}return{x:i,y:e,width:s,height:a}},setText:function(t,i){var e=t.node;e&&(e.innerHTML=i);this.setAttr(t,"text-anchor",t.anchor)},addListener:function(t,i,e){t.node["on"+i]=e},move:function(t,i,e){var s=t.node,a=s.style;"text"==t.type&&(e-=AmCharts.removePx(a.fontSize)/2-1);"oval"==t.shapeType&&(i-=AmCharts.removePx(a.width)/2,e-=AmCharts.removePx(a.height)/2);t=t.bw;isNaN(t)||(i-=t,e-=t);isNaN(i)||isNaN(e)||(s.style.left=i+"px",s.style.top=e+"px")},svgPathToVml:function(t){var i=t.split(" ");t="";var e,s=Math.round,a;for(a=0;a<i.length;a++){var r=i[a],h=r.substring(0,1),r=r.substring(1),o=r.split(","),n=s(o[0])+","+s(o[1]);"M"==h&&(t+=" m "+n);"L"==h&&(t+=" l "+n);"Z"==h&&(t+=" x e");if("Q"==h){var l=e.length,d=e[l-1],u=o[0],c=o[1],n=o[2],m=o[3];e=s(e[l-2]/3+2/3*u);d=s(d/3+2/3*c);u=s(2/3*u+n/3);c=s(2/3*c+m/3);t+=" c "+e+","+d+","+u+","+c+","+n+","+m}"A"==h&&(t+=" wa "+r);"B"==h&&(t+=" at "+r);e=o}return t},animate:function(t,i,e,s,a){var r=t.node,h=this.chart;if("translate"==i){i=e.split(",");e=i[1];var o=r.offsetTop;h.animate(t,"left",r.offsetLeft,i[0],s,a,"px");h.animate(t,"top",o,e,s,a,"px")}},clipRect:function(t,i,e,s,a){t=t.node;0===i&&0===e?(t.style.width=s+"px",t.style.height=a+"px",t.style.overflow="hidden"):t.style.clip="rect("+e+"px "+(i+s)+"px "+(e+a)+"px "+i+"px)"},rotate:function(t,i){if(0!==Number(i)){var e=t.node,s=e.style,a=this.getBGColor(e.parentNode);s.backgroundColor=a;s.paddingLeft=1;var a=i*Math.PI/180,r=Math.cos(a),h=Math.sin(a),o=AmCharts.removePx(s.left),n=AmCharts.removePx(s.top),l=e.offsetWidth,e=e.offsetHeight,d=i/Math.abs(i);s.left=o+l/2-l/2*Math.cos(a)-d*e/2*Math.sin(a)+3;s.top=n-d*l/2*Math.sin(a)+d*e/2*Math.sin(a);s.cssText=s.cssText+"; filter:progid:DXImageTransform.Microsoft.Matrix(M11='"+r+"', M12='"+-h+"', M21='"+h+"', M22='"+r+"', sizingmethod='auto expand');"}},getBGColor:function(t){var i="#FFFFFF";if(t.style){var e=t.style.backgroundColor;""!==e?i=e:t.parentNode&&(i=this.getBGColor(t.parentNode))}return i},set:function(t){var i=new AmCharts.AmDObject("group",this.D);this.D.container.appendChild(i.node);if(t){var e;for(e=0;e<t.length;e++)i.push(t[e])}return i},gradient:function(t,i,e,s){var a="";"radialGradient"==i&&(i="gradientradial",e.reverse());"linearGradient"==i&&(i="gradient");var r;for(r=0;r<e.length;r++){var h=Math.round(100*r/(e.length-1)),a=a+(h+"% "+e[r]);r<e.length-1&&(a+=",")}t=t.fill;90==s?s=0:270==s?s=180:180==s?s=90:0===s&&(s=270);8===document.documentMode?(t.type=i,t.angle=s):(t.setAttribute("type",i),t.setAttribute("angle",s));a&&(t.colors.value=a)},remove:function(t){t.clipPath&&this.D.remove(t.clipPath);this.D.remove(t.node)},disableSelection:function(t){void 0!==typeof t.onselectstart&&(t.onselectstart=function(){return!1});t.style.cursor="default"},update:function(){}});AmCharts.SVGRenderer=AmCharts.Class({construct:function(t){this.D=t;this.animations=[]},create:function(t,i){return document.createElementNS(AmCharts.SVG_NS,i)},attr:function(t,i){for(var e in i)i.hasOwnProperty(e)&&this.setAttr(t,e,i[e])},setAttr:function(t,i,e){void 0!==e&&t.node.setAttribute(i,e)},animate:function(t,i,e,s,a){var r=t.node;t["an_"+i]&&AmCharts.removeFromArray(this.animations,t["an_"+i]);"translate"==i?(r=(r=r.getAttribute("transform"))?String(r).substring(10,r.length-1):"0,0",r=r.split(", ").join(" "),r=r.split(" ").join(","),0===r&&(r="0,0")):r=r.getAttribute(i);e={obj:t,frame:0,attribute:i,from:r,to:e,time:s,effect:a};this.animations.push(e);t["an_"+i]=e},update:function(){var t,i=this.animations;for(t=i.length-1;0<=t;t--){var e=i[t],s=1e3*e.time/AmCharts.updateRate,a=e.frame+1,r=e.obj,h=e.attribute,o,n,l;a<=s?(e.frame++,"translate"==h?(o=e.from.split(","),h=Number(o[0]),o=Number(o[1]),isNaN(o)&&(o=0),n=e.to.split(","),l=Number(n[0]),n=Number(n[1]),l=0===l-h?l:Math.round(AmCharts[e.effect](0,a,h,l-h,s)),e=0===n-o?n:Math.round(AmCharts[e.effect](0,a,o,n-o,s)),h="transform",e="translate("+l+","+e+")"):(o=Number(e.from),l=Number(e.to),l-=o,e=AmCharts[e.effect](0,a,o,l,s),0===l&&this.animations.splice(t,1)),this.setAttr(r,h,e)):("translate"==h?(n=e.to.split(","),l=Number(n[0]),n=Number(n[1]),r.translate(l,n)):(l=Number(e.to),this.setAttr(r,h,l)),this.animations.splice(t,1))}},getBBox:function(t){if(t=t.node)try{return t.getBBox()}catch(i){}return{width:0,height:0,x:0,y:0}},path:function(t,i){t.node.setAttributeNS(AmCharts.SVG_XLINK,"xlink:href",i)},clipRect:function(t,i,e,s,a){var r=t.node,h=t.clipPath;h&&this.D.remove(h);var o=r.parentNode;o&&(r=document.createElementNS(AmCharts.SVG_NS,"clipPath"),h=AmCharts.getUniqueId(),r.setAttribute("id",h),this.D.rect(i,e,s,a,0,0,r),o.appendChild(r),i="#",AmCharts.baseHref&&!AmCharts.isIE&&(i=window.location.href+i),this.setAttr(t,"clip-path","url("+i+h+")"),this.clipPathC++,t.clipPath=r)},text:function(t,i,e){var s=new AmCharts.AmDObject("text",this.D);t=String(t).split("\n");var a=i["font-size"],r;for(r=0;r<t.length;r++){var h=this.create(null,"tspan");h.appendChild(document.createTextNode(t[r]));h.setAttribute("y",(a+2)*r+Math.round(a/2));h.setAttribute("x",0);s.node.appendChild(h)}s.node.setAttribute("y",Math.round(a/2));this.attr(s,i);this.D.addToContainer(s.node,e);return s},setText:function(t,i){var e=t.node;e&&(e.removeChild(e.firstChild),e.appendChild(document.createTextNode(i)))},move:function(t,i,e,s){i="translate("+i+","+e+")";s&&(i=i+" scale("+s+")");this.setAttr(t,"transform",i)},rotate:function(t,i){var e=t.node.getAttribute("transform"),s="rotate("+i+")";e&&(s=e+" "+s);this.setAttr(t,"transform",s)},set:function(t){var i=new AmCharts.AmDObject("g",this.D);this.D.container.appendChild(i.node);if(t){var e;for(e=0;e<t.length;e++)i.push(t[e])}return i},addListener:function(t,i,e){t.node["on"+i]=e},gradient:function(t,i,e,s){var a=t.node,r=t.grad;r&&this.D.remove(r);i=document.createElementNS(AmCharts.SVG_NS,i);r=AmCharts.getUniqueId();i.setAttribute("id",r);if(!isNaN(s)){var h=0,o=0,n=0,l=0;90==s?n=100:270==s?l=100:180==s?h=100:0===s&&(o=100);i.setAttribute("x1",h+"%");i.setAttribute("x2",o+"%");i.setAttribute("y1",n+"%");i.setAttribute("y2",l+"%")}for(s=0;s<e.length;s++)h=document.createElementNS(AmCharts.SVG_NS,"stop"),o=100*s/(e.length-1),0===s&&(o=0),h.setAttribute("offset",o+"%"),h.setAttribute("stop-color",e[s]),i.appendChild(h);a.parentNode.appendChild(i);e="#";AmCharts.baseHref&&!AmCharts.isIE&&(e=window.location.href+e);a.setAttribute("fill","url("+e+r+")");t.grad=i},remove:function(t){t.clipPath&&this.D.remove(t.clipPath);t.grad&&this.D.remove(t.grad);this.D.remove(t.node)}});AmCharts.AmDSet=AmCharts.Class({construct:function(t){this.create("g")},attr:function(t){this.R.attr(this.node,t)},move:function(t,i){this.R.move(this.node,t,i)}});AmCharts.AmLegend=AmCharts.Class({construct:function(){this.createEvents("rollOverMarker","rollOverItem","rollOutMarker","rollOutItem","showItem","hideItem","clickMarker","rollOverItem","rollOutItem","clickLabel");this.position="bottom";this.borderColor=this.color="#000000";this.borderAlpha=0;this.markerLabelGap=5;this.verticalGap=10;this.align="left";this.horizontalGap=0;this.spacing=10;this.markerDisabledColor="#AAB3B3";this.markerType="square";this.markerSize=16;this.markerBorderThickness=1;this.marginBottom=this.marginTop=0;this.marginLeft=this.marginRight=20;this.autoMargins=!0;this.valueWidth=50;this.switchable=!0;this.switchType="x";this.switchColor="#FFFFFF";this.rollOverColor="#CC0000";this.reversedOrder=!1;this.labelText="[[title]]";this.valueText="[[value]]";this.useMarkerColorForLabels=!1;this.rollOverGraphAlpha=1;this.textClickEnabled=!1;this.equalWidths=!0;this.dateFormat="DD-MM-YYYY";this.backgroundColor="#FFFFFF";this.backgroundAlpha=0;this.useGraphSettings=!1;this.showEntries=!0},setData:function(t){this.data=t;this.invalidateSize()},invalidateSize:function(){this.destroy();this.entries=[];this.valueLabels=[];AmCharts.ifArray(this.data)&&this.drawLegend()},drawLegend:function(){var t=this.chart,i=this.position,e=this.width,s=t.divRealWidth,a=t.divRealHeight,r=this.div,h=this.data;isNaN(this.fontSize)&&(this.fontSize=t.fontSize);if("right"==i||"left"==i)this.maxColumns=1,this.marginLeft=this.marginRight=10;else if(this.autoMargins){this.marginRight=t.marginRight;this.marginLeft=t.marginLeft;var o=t.autoMarginOffset;"bottom"==i?(this.marginBottom=o,this.marginTop=0):(this.marginTop=o,this.marginBottom=0)}e=void 0!==e?AmCharts.toCoordinate(e,s):t.realWidth;"outside"==i?(e=r.offsetWidth,a=r.offsetHeight,r.clientHeight&&(e=r.clientWidth,a=r.clientHeight)):(r.style.width=e+"px",r.className="amChartsLegend");this.divWidth=e;this.container=new AmCharts.AmDraw(r,e,a,t);this.lx=0;this.ly=8;i=this.markerSize;i>this.fontSize&&(this.ly=i/2-1);0<i&&(this.lx+=i+this.markerLabelGap);this.titleWidth=0;if(i=this.title)t=AmCharts.text(this.container,i,this.color,t.fontFamily,this.fontSize,"start",!0),t.translate(this.marginLeft,this.marginTop+this.verticalGap+this.ly+1),t=t.getBBox(),this.titleWidth=t.width+15,this.titleHeight=t.height+6;this.index=this.maxLabelWidth=0;if(this.showEntries){for(t=0;t<h.length;t++)this.createEntry(h[t]);for(t=this.index=0;t<h.length;t++)this.createValue(h[t])}this.arrangeEntries();this.updateValues()},arrangeEntries:function(){var t=this.position,i=this.marginLeft+this.titleWidth,e=this.marginRight,s=this.marginTop,a=this.marginBottom,r=this.horizontalGap,h=this.div,o=this.divWidth,n=this.maxColumns,l=this.verticalGap,d=this.spacing,u=o-e-i,c=0,m=0,p=this.container,f=p.set();this.set=f;p=p.set();f.push(p);var g=this.entries,v,C;for(C=0;C<g.length;C++){v=g[C].getBBox();var A=v.width;A>c&&(c=A);v=v.height;v>m&&(m=v)}var b=A=0,x=r;for(C=0;C<g.length;C++){var y=g[C];this.reversedOrder&&(y=g[g.length-C-1]);v=y.getBBox();var w;this.equalWidths?w=r+b*(c+d+this.markerLabelGap):(w=x,x=x+v.width+r+d);w+v.width>u&&0<C&&0!==b&&(A++,b=0,w=r,x=w+v.width+r+d,skipNewRow=!0);y.translate(w,(m+l)*A);b++;!isNaN(n)&&b>=n&&(b=0,A++);p.push(y)}v=p.getBBox();n=v.height+2*l-1;"left"==t||"right"==t?(o=v.width+2*r,h.style.width=o+i+e+"px"):o=o-i-e-1;e=AmCharts.polygon(this.container,[0,o,o,0],[0,0,n,n],this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);f.push(e);f.translate(i,s);e.toBack();i=r;if("top"==t||"bottom"==t||"absolute"==t||"outside"==t)"center"==this.align?i=r+(o-v.width)/2:"right"==this.align&&(i=r+o-v.width);p.translate(i,l+1);this.titleHeight>n&&(n=this.titleHeight);t=n+s+a+1;0>t&&(t=0);h.style.height=Math.round(t)+"px"},createEntry:function(t){if(!1!==t.visibleInLegend){var i=this.chart,e=t.markerType;e||(e=this.markerType);var s=t.color,a=t.alpha;t.legendKeyColor&&(s=t.legendKeyColor());t.legendKeyAlpha&&(a=t.legendKeyAlpha());var r;!0===t.hidden&&(r=s=this.markerDisabledColor);var h,o=t.customMarker;o||(o=this.customMarker);var n=this.container,l=this.markerSize,d=0;this.useGraphSettings?(e=t.type,"line"==e||"step"==e||"smoothedLine"==e||"ohlc"==e)?(this.switchType=void 0,h=n.set(),t.hidden||(s=t.lineColor,r=t.bulletBorderColor),d=AmCharts.line(n,[0,2*l],[l/2,l/2],s,t.lineAlpha,t.lineThickness,t.dashLength),h.push(d),t.bullet&&(t.hidden||(s=t.bulletColor),d=AmCharts.bullet(n,t.bullet,t.bulletSize,s,t.bulletAlpha,t.bulletBorderThickness,r,t.bulletBorderAlpha))&&(d.translate(l+1,l/2),h.push(d)),d=l):(t.getGradRotation&&(h=t.getGradRotation()),(h=this.createMarker("square",t.fillColors,t.fillAlphas,t.lineThickness,s,t.lineAlpha,h))&&h.translate(l/2,l/2)):o?(i.path&&(o=i.path+o),h=n.image(o,0,0,l,l)):(h=this.createMarker(e,s,a))&&h.translate(l/2,l/2);this.addListeners(h,t);n=n.set([h]);this.switchable&&n.setAttr("cursor","pointer");r=this.switchType;var u;r&&(u="x"==r?this.createX():this.createV(),u.dItem=t,!0!==t.hidden?"x"==r?u.hide():u.show():"x"!=r&&u.hide(),this.switchable||u.hide(),this.addListeners(u,t),t.legendSwitch=u,n.push(u));r=this.color;t.showBalloon&&this.textClickEnabled&&void 0!==this.selectedColor&&(r=this.selectedColor);this.useMarkerColorForLabels&&(r=s);!0===t.hidden&&(r=this.markerDisabledColor);s=AmCharts.massReplace(this.labelText,{"[[title]]":t.title});e=this.fontSize;h&&l<=e&&(l=l/2+0+this.ly-e/2+(e+2-l)/2,h.translate(0,l),u&&u.translate(0,l));var c;s&&(s=AmCharts.fixNewLines(s),t.legendTextReal=s,c=AmCharts.text(this.container,s,r,i.fontFamily,e,"start"),c.translate(this.lx+d,this.ly),n.push(c),i=c.getBBox().width,this.maxLabelWidth<i&&(this.maxLabelWidth=i));this.entries[this.index]=n;t.legendEntry=this.entries[this.index];t.legendLabel=c;this.index++}},addListeners:function(t,i){var e=this;t&&t.mouseover(function(){e.rollOverMarker(i)}).mouseout(function(){e.rollOutMarker(i)}).click(function(){e.clickMarker(i)})},rollOverMarker:function(t){this.switchable&&this.dispatch("rollOverMarker",t);this.dispatch("rollOverItem",t)},rollOutMarker:function(t){this.switchable&&this.dispatch("rollOutMarker",t);this.dispatch("rollOutItem",t)},clickMarker:function(t){this.switchable?!0===t.hidden?this.dispatch("showItem",t):this.dispatch("hideItem",t):this.textClickEnabled&&this.dispatch("clickMarker",t)},rollOverLabel:function(t){t.hidden||(this.textClickEnabled&&t.legendLabel&&t.legendLabel.attr({fill:this.rollOverColor}),this.dispatch("rollOverItem",t))},rollOutLabel:function(t){if(!t.hidden){if(this.textClickEnabled&&t.legendLabel){var i=this.color;void 0!==this.selectedColor&&t.showBalloon&&(i=this.selectedColor);this.useMarkerColorForLabels&&(i=t.lineColor,void 0===i&&(i=t.color));t.legendLabel.attr({fill:i})}this.dispatch("rollOutItem",t)}},clickLabel:function(t){this.textClickEnabled?t.hidden||this.dispatch("clickLabel",t):this.switchable&&(!0===t.hidden?this.dispatch("showItem",t):this.dispatch("hideItem",t))},dispatch:function(t,i){this.fire(t,{type:t,dataItem:i,target:this,chart:this.chart})},createValue:function(t){var i=this,e=i.fontSize;if(!1!==t.visibleInLegend){var s=i.maxLabelWidth;i.equalWidths||(i.valueAlign="left");"left"==i.valueAlign&&(s=t.legendEntry.getBBox().width);var a=s;if(i.valueText){var r=i.color;i.useMarkerColorForValues&&(r=t.color,t.legendKeyColor&&(r=t.legendKeyColor()));!0===t.hidden&&(r=i.markerDisabledColor);var h=i.valueText,s=s+i.lx+i.markerLabelGap+i.valueWidth,o="end";"left"==i.valueAlign&&(s-=i.valueWidth,
o="start");r=AmCharts.text(i.container,h,r,i.chart.fontFamily,e,o);r.translate(s,i.ly);i.entries[i.index].push(r);a+=i.valueWidth+2*i.markerLabelGap;r.dItem=t;i.valueLabels.push(r)}i.index++;r=i.markerSize;r<e+7&&(r=e+7,AmCharts.VML&&(r+=3));e=i.container.rect(i.markerSize,0,a,r,0,0).attr({stroke:"none",fill:"#ffffff","fill-opacity":.005});e.dItem=t;i.entries[i.index-1].push(e);e.mouseover(function(){i.rollOverLabel(t)}).mouseout(function(){i.rollOutLabel(t)}).click(function(){i.clickLabel(t)})}},createV:function(){var t=this.markerSize;return AmCharts.polygon(this.container,[t/5,t/2,t-t/5,t/2],[t/3,t-t/5,t/5,t/1.7],this.switchColor)},createX:function(){var t=this.markerSize-3,i={stroke:this.switchColor,"stroke-width":3},e=this.container,s=AmCharts.line(e,[3,t],[3,t]).attr(i),t=AmCharts.line(e,[3,t],[t,3]).attr(i);return this.container.set([s,t])},createMarker:function(t,i,e,s,a,r,h){var o=this.markerSize,n=this.container;a||(a=this.markerBorderColor);a||(a=i);isNaN(s)&&(s=this.markerBorderThickness);isNaN(r)&&(r=this.markerBorderAlpha);return AmCharts.bullet(n,t,o,i,e,s,a,r,o,h)},validateNow:function(){this.invalidateSize()},updateValues:function(){var t=this.valueLabels,i=this.chart,e;for(e=0;e<t.length;e++){var s=t[e],a=s.dItem,r=" ";if(void 0!==a.type){var h=a.currentDataItem,o=this.periodValueText;a.legendPeriodValueText&&(o=a.legendPeriodValueText);h?(r=this.valueText,a.legendValueText&&(r=a.legendValueText),r=i.formatString(r,h)):o&&(r=i.formatPeriodString(o,a))}else r=i.formatString(this.valueText,a);(h=a.legendLabel)&&h.text(a.legendTextReal);s.text(r)}},renderFix:function(){if(!AmCharts.VML){var t=this.container;t&&t.renderFix()}},destroy:function(){this.div.innerHTML="";AmCharts.remove(this.set)}});AmCharts.formatMilliseconds=function(t,i){if(-1!=t.indexOf("fff")){var e=i.getMilliseconds(),s=String(e);10>e&&(s="00"+e);10<=e&&100>e&&(s="0"+e);t=t.replace(/fff/g,s)}return t};AmCharts.extractPeriod=function(t){var i=AmCharts.stripNumbers(t),e=1;i!=t&&(e=Number(t.slice(0,t.indexOf(i))));return{period:i,count:e}};AmCharts.resetDateToMin=function(t,i,e,s){void 0===s&&(s=1);var a,r,h,o,n,l,d;AmCharts.useUTC?(a=t.getUTCFullYear(),r=t.getUTCMonth(),h=t.getUTCDate(),o=t.getUTCHours(),n=t.getUTCMinutes(),l=t.getUTCSeconds(),d=t.getUTCMilliseconds(),t=t.getUTCDay()):(a=t.getFullYear(),r=t.getMonth(),h=t.getDate(),o=t.getHours(),n=t.getMinutes(),l=t.getSeconds(),d=t.getMilliseconds(),t=t.getDay());switch(i){case"YYYY":a=Math.floor(a/e)*e;r=0;h=1;d=l=n=o=0;break;case"MM":r=Math.floor(r/e)*e;h=1;d=l=n=o=0;break;case"WW":0===t&&0<s&&(t=7);h=h-t+s;d=l=n=o=0;break;case"DD":d=l=n=o=0;break;case"hh":o=Math.floor(o/e)*e;d=l=n=0;break;case"mm":n=Math.floor(n/e)*e;d=l=0;break;case"ss":l=Math.floor(l/e)*e;d=0;break;case"fff":d=Math.floor(d/e)*e}AmCharts.useUTC?(t=new Date,t.setUTCFullYear(a,r,h),t.setUTCHours(o,n,l,d)):t=new Date(a,r,h,o,n,l,d);return t};AmCharts.getPeriodDuration=function(t,i){void 0===i&&(i=1);var e;switch(t){case"YYYY":e=316224e5;break;case"MM":e=26784e5;break;case"WW":e=6048e5;break;case"DD":e=864e5;break;case"hh":e=36e5;break;case"mm":e=6e4;break;case"ss":e=1e3;break;case"fff":e=1}return e*i};AmCharts.intervals={s:{nextInterval:"ss",contains:1e3},ss:{nextInterval:"mm",contains:60,count:0},mm:{nextInterval:"hh",contains:60,count:1},hh:{nextInterval:"DD",contains:24,count:2},DD:{nextInterval:"",contains:Infinity,count:3}};AmCharts.getMaxInterval=function(t,i){var e=AmCharts.intervals;return t>=e[i].contains?(t=Math.round(t/e[i].contains),i=e[i].nextInterval,AmCharts.getMaxInterval(t,i)):"ss"==i?e[i].nextInterval:i};AmCharts.dayNames="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ");AmCharts.shortDayNames="Sun Mon Tue Wed Thu Fri Sat".split(" ");AmCharts.monthNames="January February March April May June July August September October November December".split(" ");AmCharts.shortMonthNames="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");AmCharts.getWeekNumber=function(t){t=new Date(t);t.setHours(0,0,0);t.setDate(t.getDate()+4-(t.getDay()||7));var i=new Date(t.getFullYear(),0,1);return Math.ceil(((t-i)/864e5+1)/7)};AmCharts.stringToDate=function(t,i){var e={},s=[{pattern:"YYYY",period:"year"},{pattern:"YY",period:"year"},{pattern:"MM",period:"month"},{pattern:"M",period:"month"},{pattern:"DD",period:"date"},{pattern:"D",period:"date"},{pattern:"JJ",period:"hours"},{pattern:"J",period:"hours"},{pattern:"HH",period:"hours"},{pattern:"H",period:"hours"},{pattern:"KK",period:"hours"},{pattern:"K",period:"hours"},{pattern:"LL",period:"hours"},{pattern:"L",period:"hours"},{pattern:"NN",period:"minutes"},{pattern:"N",period:"minutes"},{pattern:"SS",period:"seconds"},{pattern:"S",period:"seconds"},{pattern:"QQQ",period:"milliseconds"},{pattern:"QQ",period:"milliseconds"},{pattern:"Q",period:"milliseconds"}],a=!0,r=i.indexOf("AA");-1!=r&&(t.substr(r,2),"pm"==t.toLowerCase&&(a=!1));var r=i,h,o,n;for(n=0;n<s.length;n++)o=s[n].period,e[o]=0,"date"==o&&(e[o]=1);for(n=0;n<s.length;n++)if(h=s[n].pattern,o=s[n].period,-1!=i.indexOf(h)){var l=AmCharts.getFromDateString(h,t,r);i=i.replace(h,"");if("KK"==h||"K"==h||"LL"==h||"L"==h)a||(l+=12);e[o]=l}return new Date(e.year,e.month,e.date,e.hours,e.minutes,e.seconds,e.milliseconds)};AmCharts.getFromDateString=function(t,i,e){e=e.indexOf(t);i=i.substr(e,t.length);"0"==i.charAt(0)&&(i=i.substr(1,i.length-1));i=Number(i);isNaN(i)&&(i=0);-1!=t.indexOf("M")&&i--;return i};AmCharts.formatDate=function(t,i){var e,s,a,r,h,o,n,l,d=AmCharts.getWeekNumber(t);AmCharts.useUTC?(e=t.getUTCFullYear(),s=t.getUTCMonth(),a=t.getUTCDate(),r=t.getUTCDay(),h=t.getUTCHours(),o=t.getUTCMinutes(),n=t.getUTCSeconds(),l=t.getUTCMilliseconds()):(e=t.getFullYear(),s=t.getMonth(),a=t.getDate(),r=t.getDay(),h=t.getHours(),o=t.getMinutes(),n=t.getSeconds(),l=t.getMilliseconds());var u=String(e).substr(2,2),c=s+1;9>s&&(c="0"+c);var m=a;10>a&&(m="0"+a);var p="0"+r;i=i.replace(/W/g,d);d=h;24==d&&(d=0);var f=d;10>f&&(f="0"+f);i=i.replace(/JJ/g,f);i=i.replace(/J/g,d);d=h;0===d&&(d=24);f=d;10>f&&(f="0"+f);i=i.replace(/HH/g,f);i=i.replace(/H/g,d);d=h;11<d&&(d-=12);f=d;10>f&&(f="0"+f);i=i.replace(/KK/g,f);i=i.replace(/K/g,d);d=h;0===d&&(d=12);12<d&&(d-=12);f=d;10>f&&(f="0"+f);i=i.replace(/LL/g,f);i=i.replace(/L/g,d);d=o;10>d&&(d="0"+d);i=i.replace(/NN/g,d);i=i.replace(/N/g,o);o=n;10>o&&(o="0"+o);i=i.replace(/SS/g,o);i=i.replace(/S/g,n);n=l;10>n&&(n="00"+n);100>n&&(n="0"+n);o=l;10>o&&(o="00"+o);i=i.replace(/QQQ/g,n);i=i.replace(/QQ/g,o);i=i.replace(/Q/g,l);i=12>h?i.replace(/A/g,"am"):i.replace(/A/g,"pm");i=i.replace(/YYYY/g,"@IIII@");i=i.replace(/YY/g,"@II@");i=i.replace(/MMMM/g,"@XXXX@");i=i.replace(/MMM/g,"@XXX@");i=i.replace(/MM/g,"@XX@");i=i.replace(/M/g,"@X@");i=i.replace(/DD/g,"@RR@");i=i.replace(/D/g,"@R@");i=i.replace(/EEEE/g,"@PPPP@");i=i.replace(/EEE/g,"@PPP@");i=i.replace(/EE/g,"@PP@");i=i.replace(/E/g,"@P@");i=i.replace(/@IIII@/g,e);i=i.replace(/@II@/g,u);i=i.replace(/@XXXX@/g,AmCharts.monthNames[s]);i=i.replace(/@XXX@/g,AmCharts.shortMonthNames[s]);i=i.replace(/@XX@/g,c);i=i.replace(/@X@/g,s+1);i=i.replace(/@RR@/g,m);i=i.replace(/@R@/g,a);i=i.replace(/@PPPP@/g,AmCharts.dayNames[r]);i=i.replace(/@PPP@/g,AmCharts.shortDayNames[r]);i=i.replace(/@PP@/g,p);return i=i.replace(/@P@/g,r)};AmCharts.changeDate=function(t,i,e,s,a){var r=-1;void 0===s&&(s=!0);void 0===a&&(a=!1);!0===s&&(r=1);switch(i){case"YYYY":t.setFullYear(t.getFullYear()+e*r);s||a||t.setDate(t.getDate()+1);break;case"MM":i=t.getMonth();t.setMonth(t.getMonth()+e*r);t.getMonth()>i+e*r&&t.setDate(t.getDate()-1);s||a||t.setDate(t.getDate()+1);break;case"DD":t.setDate(t.getDate()+e*r);break;case"WW":t.setDate(t.getDate()+7*e*r+1);break;case"hh":t.setHours(t.getHours()+e*r);break;case"mm":t.setMinutes(t.getMinutes()+e*r);break;case"ss":t.setSeconds(t.getSeconds()+e*r);break;case"fff":t.setMilliseconds(t.getMilliseconds()+e*r)}return t};
//# sourceMappingURL=amcharts.map.js